mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
SW: Instrument Saveables with debug_break
This commit is contained in:
parent
9eefd3d892
commit
e6dd2741f3
1 changed files with 28 additions and 5 deletions
|
@ -105,6 +105,7 @@ int Saveable_FindCodeSym(void *ptr, savedcodesym *sym)
|
|||
}
|
||||
}
|
||||
|
||||
debug_break();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -135,6 +136,8 @@ int Saveable_FindDataSym(void *ptr, saveddatasym *sym)
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
debug_break();
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -146,8 +149,16 @@ int Saveable_RestoreCodeSym(savedcodesym *sym, void **ptr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (sym->module > saveablemodules.Size()) return -1;
|
||||
if (sym->index >= saveablemodules[sym->module-1]->numcode) return -1;
|
||||
if (sym->module > saveablemodules.Size())
|
||||
{
|
||||
debug_break();
|
||||
return -1;
|
||||
}
|
||||
if (sym->index >= saveablemodules[sym->module-1]->numcode)
|
||||
{
|
||||
debug_break();
|
||||
return -1;
|
||||
}
|
||||
|
||||
*ptr = saveablemodules[sym->module-1]->code[sym->index];
|
||||
|
||||
|
@ -162,9 +173,21 @@ int Saveable_RestoreDataSym(saveddatasym *sym, void **ptr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (sym->module > saveablemodules.Size()) return -1;
|
||||
if (sym->index >= saveablemodules[sym->module-1]->numdata) return -1;
|
||||
if (sym->offset >= saveablemodules[sym->module-1]->data[sym->index].size) return -1;
|
||||
if (sym->module > saveablemodules.Size())
|
||||
{
|
||||
debug_break();
|
||||
return -1;
|
||||
}
|
||||
if (sym->index >= saveablemodules[sym->module-1]->numdata)
|
||||
{
|
||||
debug_break();
|
||||
return -1;
|
||||
}
|
||||
if (sym->offset >= saveablemodules[sym->module-1]->data[sym->index].size)
|
||||
{
|
||||
debug_break();
|
||||
return -1;
|
||||
}
|
||||
|
||||
*ptr = (void *)((intptr_t)saveablemodules[sym->module-1]->data[sym->index].base + sym->offset);
|
||||
|
||||
|
|
Loading…
Reference in a new issue