possibly unintialized variable
authorDavid Griffith <dave@661.org>
Sat, 21 Jan 2012 11:24:26 +0000 (03:24 -0800)
committerDavid Griffith <dave@661.org>
Sat, 21 Jan 2012 11:24:26 +0000 (03:24 -0800)
src/common/fastmem.c

index 694c42185afb0162405de6a931a3fb924de39dc7..081c3603e21b47c10f1c73e0b770a87d9c3d6774 100644 (file)
@@ -1026,7 +1026,7 @@ int save_undo (void)
     long diff_size;
     zword stack_size;
     undo_t *p;
-    long pc = p->pc;
+    long pc;
 
     if (f_setup.undo_slots == 0)       /* undo feature unavailable */
        return -1;
@@ -1056,6 +1056,7 @@ int save_undo (void)
     } while (!p && undo_count);
     if (p == NULL)
        return -1;
+    pc = p->pc;
     GET_PC (pc);       /* Turbo C doesn't like seeing p->pc here */
     p->pc = pc;
     p->frame_count = frame_count;