diff --git a/library/Process-windows.cpp b/library/Process-windows.cpp index b9e58462b..cb2e16bd2 100644 --- a/library/Process-windows.cpp +++ b/library/Process-windows.cpp @@ -345,9 +345,16 @@ int Process::adjustOffset(int offset, bool to_file) string Process::doReadClassName (void * vptr) { - char * rtti = readPtr((char *)vptr - 0x4); + char * rtti = readPtr((char *)vptr - sizeof(void*)); +#ifdef DFHACK64 + char * typeinfo = d->base + readDWord(rtti + 0xC); + string raw = readCString(typeinfo + 0x10+4); // skips the .?AV +#else char * typeinfo = readPtr(rtti + 0xC); string raw = readCString(typeinfo + 0xC); // skips the .?AV +#endif + if (!raw.length()) + return "dummy"; raw.resize(raw.length() - 2);// trim @@ from end return raw; } diff --git a/library/VersionInfoFactory.cpp b/library/VersionInfoFactory.cpp index 672f5a9c8..707c2809f 100644 --- a/library/VersionInfoFactory.cpp +++ b/library/VersionInfoFactory.cpp @@ -136,7 +136,11 @@ void VersionInfoFactory::ParseVersion (TiXmlElement* entry, VersionInfo* mem) } if ((is_vtable && no_vtables) || (!is_vtable && no_globals)) continue; +#ifdef DFHACK64 + uintptr_t addr = strtoull(cstr_value, 0, 0); +#else uintptr_t addr = strtol(cstr_value, 0, 0); +#endif if (is_vtable) mem->setVTable(cstr_key, addr); else