From 548888399175c22eed2f9d0c13b1dadd1b0a21a5 Mon Sep 17 00:00:00 2001 From: Fatbag Date: Wed, 26 Dec 2012 09:51:32 -0600 Subject: [PATCH] Rewrote hitdump to use a parser and Shutdown_M --- .gitignore | 3 + Libraries/FileHandler/iff/iffexport.c | 5 +- Libraries/FileHandler/utk/utkdecode.c | 5 +- Libraries/FileHandler/xa/xadecode.c | 5 +- Libraries/libgldemo/wgl.c | 2 +- .../TSOEdithEditor/TSOEdithEditor.hpp | 142 ++++-- Tools/hitutils/hitdump.c | 453 +++++++----------- Tools/rtti-reader/rtti-reader.cpp | 19 +- 8 files changed, 311 insertions(+), 323 deletions(-) diff --git a/.gitignore b/.gitignore index 34366a0..3aa1c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -110,6 +110,9 @@ qrc_*.cpp *.tar.* *.zip *.7z +*.gz +*.bz2 +*.xz *.rar *.cab *.msi diff --git a/Libraries/FileHandler/iff/iffexport.c b/Libraries/FileHandler/iff/iffexport.c index 0272d03..f714a65 100644 --- a/Libraries/FileHandler/iff/iffexport.c +++ b/Libraries/FileHandler/iff/iffexport.c @@ -29,11 +29,12 @@ static IFFFile IFFFileInfo; static int iffcreated = 0; static void Shutdown_M(const char * Message){ - fprintf(stderr, "iffexport: error: %s.", Message); + fprintf(stderr, "iffexport: error: %s.\n", Message); if(iffcreated) iff_delete(&IFFFileInfo); free(IFFData); - fclose(hFile); + if(hFile) + fclose(hFile); exit(EXIT_FAILURE); } diff --git a/Libraries/FileHandler/utk/utkdecode.c b/Libraries/FileHandler/utk/utkdecode.c index 655e5ae..41f3b0f 100644 --- a/Libraries/FileHandler/utk/utkdecode.c +++ b/Libraries/FileHandler/utk/utkdecode.c @@ -39,10 +39,11 @@ static uint8_t * UTKData = NULL; static uint8_t * WaveData = NULL; static void Shutdown_M(const char * Message){ - fprintf(stderr, "utkdecode: error: %s.", Message); + fprintf(stderr, "utkdecode: error: %s.\n", Message); free(WaveData); free(UTKData); - fclose(hFile); + if(hFile) + fclose(hFile); exit(EXIT_FAILURE); } diff --git a/Libraries/FileHandler/xa/xadecode.c b/Libraries/FileHandler/xa/xadecode.c index 6b8901f..0414232 100644 --- a/Libraries/FileHandler/xa/xadecode.c +++ b/Libraries/FileHandler/xa/xadecode.c @@ -39,10 +39,11 @@ static uint8_t * XAData = NULL; static uint8_t * WaveData = NULL; static void Shutdown_M(const char * Message){ - fprintf(stderr, "xadecode: error: %s.", Message); + fprintf(stderr, "xadecode: error: %s.\n", Message); free(WaveData); free(XAData); - fclose(hFile); + if(hFile) + fclose(hFile); exit(EXIT_FAILURE); } diff --git a/Libraries/libgldemo/wgl.c b/Libraries/libgldemo/wgl.c index afcdb39..f70e0c1 100644 --- a/Libraries/libgldemo/wgl.c +++ b/Libraries/libgldemo/wgl.c @@ -53,7 +53,7 @@ static void KillGLWindow() static int CreateGLWindow(const char *__restrict title, uint16_t width, uint16_t height) { - PIXELFORMATDESCRIPTOR pfd = { + const PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), 1, /* Size and version */ PFD_DRAW_TO_WINDOW | /* dwFlags */ PFD_SUPPORT_OPENGL | diff --git a/Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.hpp b/Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.hpp index 2214dae..1d99ad9 100644 --- a/Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.hpp +++ b/Tools/TSOSimulatorClient/TSOEdithEditor/TSOEdithEditor.hpp @@ -19,50 +19,126 @@ #include #pragma pack(0) -DECLARE_INTERFACE(cUnknownObject1) +DECLARE_INTERFACE(cRZString) { - DWORD Zero1; - DWORD Zero2; - void * vtable5; - char ** Strings1; - char ** Strings2; - char ** Strings3; - DWORD Zero3; - DWORD Zero4; - DWORD Zero5; - void ** Pointer1; //12 bytes - void ** Pointer2; //4 bytes - void ** Pointer3; - DWORD Flags; - DWORD * Pointer4; //4 bytes - void * Pointer5; - void * Pointer6; - DWORD Unknown11; - DWORD Unknown12; + void * vtable1_cRZString; + char * mpBegin; //Pointer to beginning of string + char * mpEnd; //Pointer to null terminator + char * mpCapacity; //mpEnd + 1 + DWORD mAllocator; //0 + DWORD Zero1; //0 }; -DECLARE_INTERFACE(cTSOEdithEditorDCOMDirector) +struct stringstruct { - void * vtable2; - void * vtable1; - cUnknownObject1 Object1; - void * vtable4; - void * vtable3; - cUnknownObject1 Object2; - cUnknownObject1 Object3; - + DWORD StringID; + DWORD Unknown; + char * PointerToBuffer; //Buffer + DWORD SizeOfBuffer; //256 + char Buffer[256]; +}; + +DECLARE_INTERFACE(cEdithEditorCOMDirector) +{ + void * vtable_1_cEdithEditorCOMDirector; + void * vtable_2_cEdithEditorCOMDirector; DWORD Zero1; DWORD Zero2; - DWORD Zero3; - DWORD Zero4; + cRZString string; DWORD Zero5; DWORD Zero6; DWORD Zero7; DWORD Zero8; DWORD Zero9; DWORD Zero10; - DWORD Unknown1; - DWORD Pointer1; - DWORD Pointer2; DWORD Zero11; + void * ptr; + DWORD Value1; //2 + DWORD Value2; //1 + float Value3; //1.0f + DWORD Value4; //0x40000000 + DWORD Value5; //2 + DWORD Value6; //0 + DWORD Value7; //1 + DWORD Value8; //0 + stringstruct string0; //StringID:0, Unknown:40, value:"index" + stringstruct string1; //StringID:1, Unknown:40, value:"value" + stringstruct string2; //StringID:2, Unknown:150, value:"Name" + stringstruct string3; //StringID:3, Unknown:200, value:"Description" + DWORD Value9; //0 + DWORD Value10; //0 + stringstruct string4; //StringID:0, Unknown:90, value:"Calling Tree" + stringstruct string5; //StringID:1, Unknown:86, value:"Type" + stringstruct string6; //StringID:2, Unknown:83, value:"Title" + stringstruct string7; //StringID:3, Unknown:65, value:"Yes" + stringstruct string8; //StringID:4, Unknown:65, value:"No" + stringstruct string9; //StringID:5, Unknown:65, value:"Cancel" + stringstruct string10; //StringID:6, Unknown:300, value:"Message" + stringstruct string11; //StringID:7, Unknown:45, value:"Tree ID" + stringstruct string12; //StringID:8, Unknown:50, value:"Node #" +}; + +DECLARE_INTERFACE(cTSOEdithEditorDCOMDirector) +{ + void * vtable1_cTSOEdithEditorDCOMDirector; + void * vtable2_cTSOEdithEditorDCOMDirector; + DWORD Zero1; + DWORD Zero2; + cRZString String1; + DWORD Zero5; + DWORD Zero6; + cEdithEditorCOMDirector ** memptr_1; + void ** memptr_2; + void ** memptr_3; //Same as memptr_2 + DWORD Zero7; + DWORD Zero8; + void * dllptr_4_100B5834; //CMemoryException TD + DWORD Value1; //1 + DWORD Value2; //0 + float Value3; //1.0f + DWORD Value4; //0x40000000 + DWORD Value5; //0 + DWORD Value6; //0 + DWORD Value7; //1 + cRZString String2; + cRZString String3; + cRZString String4; + cRZString String5; + cRZString String6; + cRZString String7; + cRZString String8; + cRZString String9; + DWORD Zero9; + DWORD Zero10; + DWORD Zero11; + DWORD Zero12; + DWORD Zero13; + DWORD Zero14; + DWORD Zero15; + cRZString String10; + cRZString String11; + cRZString String12; + cRZString String13; + cRZString String14; + DWORD Zero16; + DWORD Zero17; + DWORD Zero18; + DWORD Zero19; + DWORD Zero20; + cRZString String15; + cRZString String16; + cRZString String17; + cRZString String18; + cRZString String19; + cRZString String20; + cRZString String21; + cRZString String22; + cRZString String23; + cRZString String24; + cRZString String25; + cRZString String26; + cRZString String27; + cRZString String28; + cRZString String29; + cRZString String30; }; \ No newline at end of file diff --git a/Tools/hitutils/hitdump.c b/Tools/hitutils/hitdump.c index a2ec6b4..571b58f 100644 --- a/Tools/hitutils/hitdump.c +++ b/Tools/hitutils/hitdump.c @@ -16,6 +16,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include #include #include #include @@ -33,6 +34,8 @@ #define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1))) #endif +static void Shutdown_M(const char * Message, ...); + enum { hsm, hot, evt, hit, out, filecount }; @@ -333,6 +336,55 @@ static __inline const char * find_global(uint32_t x, const global_t * Globals, s return NULL; } +typedef struct { + uint8_t * Data; + size_t Size; +} ByteReaderContext; + +enum TokenizeType { + TK_STRING, + TK_ID +}; + +static int parser_find(ByteReaderContext *brc, ...){ + va_list args; + va_start(args, brc); + + while(1){ + uint8_t * Start = brc->Data; + const char * Pattern; + size_t Length; + void * Destination; + enum TokenizeType Type; + + Pattern = va_arg(args, const char *); + if(Pattern == NULL){ + va_end(args); + return 1; + } + + for(Length = strlen(Pattern); ; brc->Data++, brc->Size--){ + if(brc->Size < Length){ + va_end(args); + return 0; + } + if(!memcmp(brc->Data, Pattern, Length)) break; + } + *brc->Data = '\0'; + brc->Data += Length; brc->Size -= Length; + + Destination = va_arg(args, void *); + if(Destination == NULL) + continue; + + Type = va_arg(args, enum TokenizeType); + if(Type == TK_STRING) + *((char**)Destination) = (char*)Start; + else + *((uint32_t*)Destination) = strtoul((char*)Start, NULL, 0); + } +} + typedef struct { uint32_t LogicalAddress; uint32_t TrackID; @@ -348,8 +400,11 @@ typedef struct { } addresslist_t; static address_t * add_address(addresslist_t * List){ - if(List->Count == List->Size) + if(List->Count == List->Size){ List->Entries = realloc(List->Entries, (List->Size <<= 1) * sizeof(address_t)); + if(!List->Entries) + Shutdown_M("%sCould not allocate memory for address list.\n", "hitdump: Error: "); + } return memset(List->Entries + List->Count++, 0, sizeof(address_t)); } @@ -390,35 +445,21 @@ static __inline address_t * find_address_by_name(addresslist_t * List, const cha } static __inline void read_hit_addresses(uint8_t * Data, size_t Size, addresslist_t * AddressList, uint32_t * SymbolTable){ - uint8_t * Start = Data, * TableData; + uint8_t * TableData; unsigned i, count = 0; + ByteReaderContext brc; + brc.Data = Data; brc.Size = Size; - if(Size < 32) return; - Data += 16; - Size -= 16; + if(!parser_find(&brc, "ENTP", NULL, NULL) || brc.Size < 4) return; + TableData = brc.Data; + *SymbolTable = TableData - 4 - Data; - /* Find the table start */ - while(memcmp(Data, "ENTP", 4)){ - if(Size < 17) return; - Data++; Size--; - } - - TableData = Data; - Data += 4; - Size -= 4; - - /* Find the table end */ while(memcmp(Data, "EENT", 4)){ if(Size < 12) return; Data+=8; Size-=8; count++; } - *SymbolTable = TableData - Start; - - if(count == 0) return; - TableData += 4; - for(i=0; iExported = 1; @@ -428,106 +469,45 @@ static __inline void read_hit_addresses(uint8_t * Data, size_t Size, addresslist } static __inline void read_evt_addresses(uint8_t * Data, size_t Size, addresslist_t * AddressList){ - if(Size < 13) return; + ByteReaderContext brc; + brc.Data = Data; brc.Size = Size; while(1){ - uint8_t * Name = Data, * TrackIDPos; address_t * Address; + char *Name; uint32_t TrackID; + if(!parser_find(&brc, + ",", &Name, TK_STRING, + ",", NULL, + ",", &TrackID, TK_ID, + NULL)) return; - Data++; Size--; - - /* End of first field: address name */ - while(*Data != ','){ - if(Size < 13) return; - Data++; Size--; - } - *Data = '\0'; - Data++; Size--; - - /* End of second field: unneeded */ - while(*Data != ','){ - if(Size < 11) return; - Data++; Size--; - } - Data++; Size--; - TrackIDPos = Data; - - /* End of third field: Track ID */ - while(*Data != ','){ - if(Size < 9) return; - Data++; Size--; - } - *Data = '\0'; - Data++; Size--; - - TrackID = atoi((char*)TrackIDPos); Address = find_address_by_track_id(AddressList, TrackID); if(!Address){ Address = add_address(AddressList); Address->Exported = 1; Address->TrackID = TrackID; } - Address->Name = (char*)Name; - - while(*Data != '\n'){ - if(Size < 15) return; - Data++; Size--; - } - Data++; Size--; + Address->Name = Name; + if(!parser_find(&brc, "\n", NULL, NULL)) return; } } static __inline void read_hsm_addresses(uint8_t * Data, size_t Size, addresslist_t * AddressList){ - if(Size < 24) return; + ByteReaderContext brc; + brc.Data = Data; brc.Size = Size; while(1){ - uint8_t * Name, * IDPos; address_t * Address; + char * Name; uint32_t SoundID, LogicalAddress; - - /* Find the next constant that begins with "tkd_" */ - while(memcmp(Data, "\ntkd_", 5)){ - if(Size < 25) return; - Data++; Size--; - } - Name = Data += 5; - Size -= 5; - - /* End of tkd constant name */ - while(*Data != ' '){ - if(Size < 19) return; - Data++; Size--; - } - *Data = '\0'; - Data++; Size--; - IDPos = Data; - - /* End of tkd constant value */ - while(*Data != ' '){ - if(Size < 17) return; - Data++; Size--; - } - *Data = '\0'; - Data++; Size--; - SoundID = atoi((char*)IDPos); - - /* End of address constant name */ - while(*Data != ' '){ - if(Size < 9) return; - Data++; Size--; - } - Data++; Size--; - IDPos = Data; - - /* End of address constant value */ - while(*Data != ' '){ - if(Size < 7) return; - Data++; Size--; - } - *Data = '\0'; - Data++; Data--; - LogicalAddress = atoi((char*)IDPos); + if(!parser_find(&brc, + "\ntkd_", NULL, + " ", &Name, TK_STRING, + " ", &SoundID, TK_ID, + " ", NULL, + " ", &LogicalAddress, TK_ID, + NULL)) return; Address = find_address_by_logical_address(AddressList, LogicalAddress); if(!Address){ @@ -537,52 +517,25 @@ static __inline void read_hsm_addresses(uint8_t * Data, size_t Size, addresslist Address->Name = (char*)Name; } Address->LogicalAddress = LogicalAddress; - } else Address->Name = (char*)Name; + } else Address->Name = Name; Address->SoundID = SoundID; - - while(*Data != '\n'){ - if(Size < 25) return; - Data++; Size--; - } } } static __inline void read_hot_trackdata(uint8_t * Data, size_t Size, addresslist_t * AddressList){ - if(Size < 19) return; + ByteReaderContext brc; + brc.Data = Data; brc.Size = Size; - while(memcmp(Data, "[TrackData]", 11)){ - if(Size < 20) return; - Data++; Size--; - } - - Data += 12; - Size -= 12; - if(*Data == '\n'){ - Data++; Size--; - } + if(!parser_find(&brc, "[TrackData]", NULL, NULL)) return; while(1){ - uint8_t * IDPos = Data; address_t * Address; uint32_t SoundID, LogicalAddress; - - /* End of key: Sound ID */ - while(*Data != '='){ - if(Size < 5) return; - Data++; Size--; - } - *Data = '\0'; - SoundID = strtol((char*)IDPos, NULL, 0); - Data++; Size--; - IDPos = Data; - - while(*Data != '\n'){ - if(Size < 2) return; - Data++; Size--; - } - *Data = '\0'; - LogicalAddress = strtol((char*)IDPos, NULL, 0); - Data++; Size--; + if(!brc.Size || *brc.Data == '\n' || *brc.Data == '[') return; + if(!parser_find(&brc, + "=", &SoundID, TK_ID, + "\n", &LogicalAddress, TK_ID, + NULL)) return; Address = find_address_by_logical_address(AddressList, LogicalAddress); if(!Address){ @@ -593,59 +546,25 @@ static __inline void read_hot_trackdata(uint8_t * Data, size_t Size, addresslist } Address->LogicalAddress = LogicalAddress; } else Address->SoundID = SoundID; - - if(Size < 8) return; - while(*Data == '\r' || *Data == '\n' || *Data == ' ' || *Data == '\t'){ - if(Size < 8) return; - Data++; Size--; - } - - if(*Data == '[') return; } } static __inline void read_hot_track(uint8_t * Data, size_t Size, addresslist_t * AddressList){ - if(Size < 28) return; + ByteReaderContext brc; + brc.Data = Data; brc.Size = Size; - while(memcmp(Data, "[Track]", 7)){ - if(Size < 29) return; - Data++; Size--; - } - - Data += 8; - Size -= 8; - if(*Data == '\n'){ - Data++; Size--; - } + if(!parser_find(&brc, "[Track]", NULL, NULL)) return; while(1){ - uint8_t * IDPos = Data, * Name; address_t * Address; + char * Name; uint32_t TrackID; - - /* End of key: Track ID */ - while(*Data != '='){ - if(Size < 20) return; - Data++; Size--; - } - *Data = '\0'; - TrackID = strtol((char*)IDPos, NULL, 0); - Data++; Size--; - - /* End of first field: Unknown */ - while(*Data != ','){ - if(Size < 18) return; - Data++; Size--; - } - Data++; Size--; - Name = Data; - - /* End of second field: Name */ - while(*Data != ','){ - if(Size < 16) return; - Data++; Size--; - } - *Data = '\0'; + if(!brc.Size || *brc.Data == '\n' || *brc.Data == '[') return; + if(!parser_find(&brc, + "=", &TrackID, TK_ID, + ",", NULL, + ",", &Name, TK_STRING, + NULL)) return; Address = find_address_by_name(AddressList, (char*)Name); if(!Address){ @@ -654,17 +573,11 @@ static __inline void read_hot_track(uint8_t * Data, size_t Size, addresslist_t * Address = add_address(AddressList); Address->TrackID = TrackID; } - Address->Name = (char*)Name; + Address->Name = Name; } else Address->TrackID = TrackID; Address->Exported = 1; - if(Size < 36) return; - while(*Data == '\r' || *Data == '\n' || *Data == ' ' || *Data == '\t'){ - if(Size < 22) return; - Data++; Size--; - } - - if(*Data == '[') return; + if(!parser_find(&brc, "\n", NULL, NULL)) return; } } @@ -673,25 +586,46 @@ static __inline void read_hot_addresses(uint8_t * Data, size_t Size, addresslist read_hot_track(Data, Size, AddressList); } +static FILE *hFile = NULL; +static char *path[filecount] = {NULL}; +static uint8_t *data[filecount] = {NULL}; +static char *basename = NULL; +static addresslist_t AddressList = {0}; + +static void Shutdown(){ + unsigned i; + for(i=0; i 96){ - fprintf(stderr, "%sIllegal opcode 0x%02X at address 0x%08X.\n", "hitdump: Error: ", opcode, addr); - return -1; - } + if(opcode == 0 || opcode > 96) + Shutdown_M("%sIllegal opcode 0x%02X at address 0x%08X.\n", "hitdump: Error: ", opcode, addr); instruction = Instructions + opcode - 1; operands = instruction->Operands; - if(operands == UNIMPLEMENTED){ - fprintf(stderr, "%sUnimplemented instruction '%s' at address 0x%08X.\n", "hitdump: Error: ", - instruction->Name, addr); - return -1; - } + if(operands == UNIMPLEMENTED) + Shutdown_M("%sUnimplemented instruction '%s' at address 0x%08X.\n", "hitdump: Error: ", instruction->Name, addr); addr++; - if(filesize[hit] - addr < (operands & 15)){ - fprintf(stderr, "%sInsufficient operand bytes for '%s' instruction at address 0x%08X (%u of %u supplied).\n", + if(filesize[hit] - addr < (operands & 15)) + Shutdown_M("%sInsufficient operand bytes for '%s' instruction at address 0x%08X (%u of %u supplied).\n", "hitdump: Error: ", instruction->Name, addr, filesize[hit] - addr, instruction->Operands); - return -1; - } fprintf(hFile, "\r\n\t\t%s", instruction->Name); for(i=0; (operands >>= 4) != 0; i++){ @@ -998,11 +913,9 @@ int main(int argc, char *argv[]){ int x = data[hit][addr]; if(x > 16){ const char * Global = find_global(x, Globals, GlobalCount); - if(Global == NULL){ - fprintf(stderr, "%sInvalid %s operand 0x%02X for '%s' instruction at address 0x%08X (expected %s).\n", + if(Global == NULL) + Shutdown_M("%sInvalid %s operand 0x%02X for '%s' instruction at address 0x%08X (expected %s).\n", "hitdump: Error: ", position[i], x, instruction->Name, addr, "argument, register, or global"); - return -1; - } fprintf(hFile, " %s", Global); } else fprintf(hFile, " %s", Registers[x]); addr += 1; @@ -1011,12 +924,9 @@ int main(int argc, char *argv[]){ if(filesize[hit]-addr >= 4) x = read_uint32(data[hit]+addr); - else if(data[hit][addr] != 0x05 && data[hit][addr] != 0x06){ - fprintf(stderr, - "%sInsufficient operand bytes for '%s' instruction at address 0x%08X (%u of %u supplied).\n", + else if(data[hit][addr] != 0x05 && data[hit][addr] != 0x06) + Shutdown_M("%sInsufficient operand bytes for '%s' instruction at address 0x%08X (%u of %u supplied).\n", "hitdump: Error: ", instruction->Name, addr, filesize[hit] - addr, 4); - return -1; - } if(x >= 16 && x < filesize[hit]){ Address = find_address_by_logical_address(&AddressList, x); @@ -1027,12 +937,9 @@ int main(int argc, char *argv[]){ x = data[hit][addr]; if(x > 16){ const char * Global = find_global(x, Globals, GlobalCount); - if(Global == NULL){ - fprintf(stderr, - "%sInvalid %s operand 0x%02X for '%s' instruction at address 0x%08X (expected %s).\n", + if(Global == NULL) + Shutdown_M("%sInvalid %s operand 0x%02X for '%s' instruction at address 0x%08X (expected %s).\n", "hitdump: Error: ", position[i], x, instruction->Name, addr, "argument, register, or global"); - return -1; - } fprintf(hFile, " %s", Global); } else fprintf(hFile, " %s", Registers[x]); addr += (data[hit][addr] != 0x05 && data[hit][addr] != 0x06) ? 4 : 1; @@ -1043,7 +950,7 @@ int main(int argc, char *argv[]){ fprintf(hFile, "\r\n]\r\n\r\n"); - fclose(hFile); + Shutdown(); return 0; } \ No newline at end of file diff --git a/Tools/rtti-reader/rtti-reader.cpp b/Tools/rtti-reader/rtti-reader.cpp index 86b1e7b..f970a7d 100644 --- a/Tools/rtti-reader/rtti-reader.cpp +++ b/Tools/rtti-reader/rtti-reader.cpp @@ -193,8 +193,7 @@ struct PEFile { ~PEFile(){ if(hFile) fclose(hFile); - if(Data) - free(Data); + free(Data); } inline bool seek(size_t pos, int offset = 0){ @@ -305,7 +304,7 @@ struct PEFile { PEFile * PEFile::ptr; static void Shutdown_M(const char * Message){ - fprintf(stderr, "rtti-reader: error: %s.", Message); + fprintf(stderr, "rtti-reader: error: %s.\n", Message); if(PEFile::ptr) PEFile::ptr->~PEFile(); exit(EXIT_FAILURE); @@ -344,13 +343,13 @@ int main(int argc, char *argv[]){ for(i=0; i