mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 19:45:05 +08:00
engine: common: explicitly cast function offset into size_t, even though it's signed ptrdiff, saverestore offset mistakingly used unsigned numbers
This commit is contained in:
@@ -81,7 +81,7 @@ void *COM_FunctionFromName_SR( void *hInstance, const char *pName )
|
||||
const char *COM_OffsetNameForFunction( void *function )
|
||||
{
|
||||
static string sname;
|
||||
Q_snprintf( sname, MAX_STRING, "ofs:%zu", ((byte*)function - (byte*)svgame.dllFuncs.pfnGameInit) );
|
||||
Q_snprintf( sname, MAX_STRING, "ofs:%zu", (size_t)((byte*)function - (byte*)svgame.dllFuncs.pfnGameInit ));
|
||||
Con_Reportf( "%s: %s\n", __func__, sname );
|
||||
return sname;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user