From 401b93baa98cb70d00833f6b7ce6cfdd032c5f82 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Tue, 9 Feb 2010 12:16:58 +0000 Subject: [PATCH] Init to fix valgrind use-of-uninitialized problem --- Src/1541d64.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Src/1541d64.cpp b/Src/1541d64.cpp index fac00c1..55ed190 100644 --- a/Src/1541d64.cpp +++ b/Src/1541d64.cpp @@ -126,6 +126,8 @@ ImageDrive::ImageDrive(IEC *iec, const char *filepath) : Drive(iec), the_file(NU } ch[15].mode = CHMOD_COMMAND; + memset(&this->desc, 0, sizeof(this->desc)); + Reset(); // Open image file