From 28a458f65795f475a2a459a194010bc204fe3bfb Mon Sep 17 00:00:00 2001 From: Dave Beazley Date: Fri, 23 Mar 2001 22:04:18 +0000 Subject: [PATCH] Fixed bug when no symbol base could be found. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@1063 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Tools/WAD/Wad/signal.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/WAD/Wad/signal.c b/Tools/WAD/Wad/signal.c index 9c60c0a66..b4331dc95 100644 --- a/Tools/WAD/Wad/signal.c +++ b/Tools/WAD/Wad/signal.c @@ -186,12 +186,13 @@ void wad_restore_i386_registers(WadFrame *f, int nlevels) { unsigned long *saved; int i, j; int pci; - for (i = 0; i <= nlevels; i++) { + for (i = 0; i <= nlevels; i++, f=f->next) { /* This gets the starting instruction for the stack frame */ pc = (unsigned char *) f->sym_base; /* printf("pc = %x, base = %x, %s\n", f->pc, f->sym_base, SYMBOL(f)); */ - + if (!pc) continue; + /* Look for the standard prologue 0x55 0x89 0xe5 */ if ((pc[0] == 0x55) && (pc[1] == 0x89) && (pc[2] == 0xe5)) { /* Determine the size */ @@ -226,7 +227,6 @@ void wad_restore_i386_registers(WadFrame *f, int nlevels) { else break; } } - f = f->next; } }