diff --git a/parser-library/parse.cpp b/parser-library/parse.cpp index 80343d9..3ff1460 100644 --- a/parser-library/parse.cpp +++ b/parser-library/parse.cpp @@ -363,8 +363,6 @@ bool parse_resource_table(bounded_buffer *sectionData, } resource rsrc; - memset(&rsrc, 0, sizeof(resource)); - rsrc.type_str = rde->type_str; rsrc.name_str = rde->name_str; rsrc.lang_str = rde->lang_str; diff --git a/parser-library/parse.h b/parser-library/parse.h index 2e7f662..0902f24 100644 --- a/parser-library/parse.h +++ b/parser-library/parse.h @@ -82,6 +82,10 @@ typedef struct _bounded_buffer { } bounded_buffer; struct resource { + resource() + : type(0), name(0), lang(0), codepage(0), RVA(0), size(0), buf(nullptr) { + } + std::string type_str; std::string name_str; std::string lang_str;