summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorDave Beazley <dave-swig@dabeaz.com>2001-03-23 22:04:18 +0000
committerDave Beazley <dave-swig@dabeaz.com>2001-03-23 22:04:18 +0000
commit28a458f65795f475a2a459a194010bc204fe3bfb (patch)
tree8ac969fc1fafb0dc57800a52635e351017c6da13 /Tools
parent5056e10996321884efebaef075b3f77076b7e978 (diff)
downloadswig-28a458f65795f475a2a459a194010bc204fe3bfb.tar.gz
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
Diffstat (limited to 'Tools')
-rw-r--r--Tools/WAD/Wad/signal.c6
1 files 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;
}
}