diff --git a/tools/gdc-psyfork/Makefile b/tools/gdc-psyfork/Makefile index 2e213434..62f8a492 100644 --- a/tools/gdc-psyfork/Makefile +++ b/tools/gdc-psyfork/Makefile @@ -22,12 +22,12 @@ BINARY = gdc LINK += -L. -lstdc++ -ldl -lm -INCLUDE += -I. -I../../public -I../../public/sourcepawn -I../../core -I../../core/logic +INCLUDE += -I. -I../../public -I../../core -I../../core/logic -I../../sourcepawn/include CFLAGS += -D_LINUX -Dstricmp=strcasecmp -D_stricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp \ -D_snprintf=snprintf -D_vsnprintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror \ -Wno-uninitialized -mfpmath=sse -msse -DHAVE_STDINT_H -DSM_DEFAULT_THREADER -DPLATFORM_LINUX -m32 -CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti +CPPFLAGS += -Wno-non-virtual-dtor -fno-exceptions -fno-rtti -std=c++11 -Wno-unused ################################################ ### DO NOT EDIT BELOW HERE FOR MOST PROJECTS ### diff --git a/tools/gdc-psyfork/gdc.cpp b/tools/gdc-psyfork/gdc.cpp index c022774f..333161a2 100644 --- a/tools/gdc-psyfork/gdc.cpp +++ b/tools/gdc-psyfork/gdc.cpp @@ -410,14 +410,15 @@ void CheckWindowsSigOffset(char* name, const char* symbol, int file) if(sigOffset != -1 && sigOffsetByte != NULL)//Got the offset in the function { uint8_t iByte = strtoul(sigOffsetByte, NULL, 16); + uint8_t iCompare = *(uint8_t *)((intptr_t)ptr + sigOffset); - if(iByte == *(uint8_t *)((intptr_t)ptr + sigOffset)) + if(iByte == iCompare) { - printf(" w: %s -> %s (%4d) == \\x%s GOOD\n", name, sigOffsetKey, sigOffset, sigOffsetByte); + printf(" w: %s -> %s (%4d) \\x%02X == \\x%02X GOOD\n", name, sigOffsetKey, sigOffset, iCompare, iByte); } else { - printf("! w: %s -> %s (%4d) != \\x%s BAD\n", name, sigOffsetKey, sigOffset, sigOffsetByte); + printf("! w: %s -> %s (%4d) \\x%02X != \\x%02X BAD\n", name, sigOffsetKey, sigOffset, iCompare, iByte); } } }