Improper writing of variables and eval stack led to corrupt saves.
authorDavid Griffith <dave@661.org>
Thu, 14 May 2015 05:23:14 +0000 (22:23 -0700)
committerDavid Griffith <dave@661.org>
Thu, 14 May 2015 05:23:14 +0000 (22:23 -0700)
src/common/quetzal.c

index ce78b365d7fb4d55fa71a8949a960e3a9b298ac5..c2e9f1e89559467e822749fdffcedc460e32a913 100644 (file)
@@ -539,7 +539,7 @@ zword save_quetzal (FILE *svf, FILE *stf)
            || !write_word (svf, nstk))                 return 0;
 
        /* Write the variables and eval stack. */
-       for (j=0, ++p; j<nvars+nstk; ++j, --p)
+       for (j=0, --p; j<nvars+nstk; ++j, --p)
            if (!write_word (svf, *p))                  return 0;
 
        /* Calculate length written thus far. */