]> git.wh0rd.org Git - nano.git/commitdiff
fix compilation with --enable-debug
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 29 Aug 2005 18:52:06 +0000 (18:52 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Mon, 29 Aug 2005 18:52:06 +0000 (18:52 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/global.c
src/winio.c

index 0617728a65f52ad365ace39b229af72c0645f862..7465e0e718149451dc805b64dd2941106163524e 100644 (file)
@@ -1220,8 +1220,10 @@ void thanks_for_all_the_fish(void)
 
            syntaxes->extensions = bob->next;
            free(bob->ext_regex);
-           regfree(bob->ext);
-           free(bob->ext);
+           if (bob->ext != NULL) {
+               regfree(bob->ext);
+               free(bob->ext);
+           }
            free(bob);
        }
        while (syntaxes->color != NULL) {
index f1f91c7e4415eecd0ef4e31b45b0aab0733fe1c9..8b19ffb916e08ae93ef064ba6c35f7bfe7b0f168 100644 (file)
@@ -3907,7 +3907,7 @@ void do_cursorpos(bool constant)
 
     /* Check whether totsize is correct.  If it isn't, there is a bug
      * somewhere. */
-    assert(openfile->current != openfile->filebot || i == totsize);
+    assert(openfile->current != openfile->filebot || i == openfile->totsize);
 
     if (constant && disable_cursorpos) {
        disable_cursorpos = FALSE;