From 0ce4a59418937e562b4830b1b0654d0a4887addb Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sat, 10 Sep 2016 20:42:47 +0200 Subject: Reserves less, but enough room when using the old distorm interface. --- disasm/dumpobject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'disasm/dumpobject.cpp') diff --git a/disasm/dumpobject.cpp b/disasm/dumpobject.cpp index ae09b12..f71208c 100644 --- a/disasm/dumpobject.cpp +++ b/disasm/dumpobject.cpp @@ -13,10 +13,11 @@ void dump_object(std::string file_name, binparse::Value32 object_id) auto file = parse_file(ifs); std::vector<_DecodedInst> instructions; - instructions.resize(100000); + unsigned int read_inst; std::vector code = read_object(ifs, file, object_id); + instructions.resize(code.size()); auto result = distorm_decode64( file.object_table.entries[object_id].reloc_base_address, -- cgit v1.2.3-70-g09d2