mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
C-CON: Fix VM_ScriptInfo so that it never reads before the beginning of the bytecode.
git-svn-id: https://svn.eduke32.com/eduke32@5520 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
d3f9244d66
commit
1807aec2a7
1 changed files with 1 additions and 4 deletions
|
@ -104,11 +104,8 @@ extern void VM_ScriptInfo(intptr_t const *ptr, int32_t range)
|
|||
{
|
||||
initprintf("\n");
|
||||
|
||||
for (intptr_t const *p = ptr - (range>>1); p < ptr + (range>>1); p++)
|
||||
for (intptr_t const *p = max(ptr - (range>>1), script), *p_end = min(ptr + (range>>1), script + g_scriptSize); p < p_end; p++)
|
||||
{
|
||||
if ((int32_t)(p - script) >= g_scriptSize)
|
||||
break;
|
||||
|
||||
initprintf("%5d: %3d: ", (int32_t) (p - script), (int32_t) (p - ptr));
|
||||
|
||||
if (*p >> 12 && (*p & VM_INSTMASK) < CON_END)
|
||||
|
|
Loading…
Reference in a new issue