Fix GDC byte offset check printing for linux (NPOTB)
This commit is contained in:
parent
a01a63cb71
commit
189369fcf3
@ -431,14 +431,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -482,14 +483,15 @@ void CheckLinuxSigOffset(char* name, const char* symbol, void * handle)
|
||||
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(" l: %s -> %s (%4d) == \\x%s GOOD\n", name, sigOffsetKey, sigOffset, sigOffsetByte);
|
||||
printf(" l: %s -> %s (%4d) \\x%02X == \\x%02X GOOD\n", name, sigOffsetKey, sigOffset, iCompare, iByte);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("! l: %s -> %s (%4d) != \\x%s BAD\n", name, sigOffsetKey, sigOffset, sigOffsetByte);
|
||||
printf("! l: %s -> %s (%4d) \\x%02X != \\x%02X BAD\n", name, sigOffsetKey, sigOffset, iCompare, iByte);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -502,14 +504,15 @@ void CheckLinuxSigOffset(char* name, const char* symbol, void * handle)
|
||||
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(" l: %s -> %s (%4d) == \\x%s GOOD\n", name, sigOffsetKey, sigOffset, sigOffsetByte);
|
||||
printf(" l: %s -> %s (%4d) \\x%02X == \\x%02X GOOD\n", name, sigOffsetKey, sigOffset, iCompare, iByte);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("! l: %s -> %s (%4d) != \\x%s BAD\n", name, sigOffsetKey, sigOffset, sigOffsetByte);
|
||||
printf("! l: %s -> %s (%4d) \\x%02X != \\x%02X BAD\n", name, sigOffsetKey, sigOffset, iCompare, iByte);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user