From 7fc0ada6ccb505798635829d6a7a7e9a08aba6d6 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Mon, 29 Aug 2005 18:52:06 +0000 Subject: [PATCH] fix compilation with --enable-debug git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3006 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- src/global.c | 6 ++++-- src/winio.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/global.c b/src/global.c index 0617728a..7465e0e7 100644 --- a/src/global.c +++ b/src/global.c @@ -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) { diff --git a/src/winio.c b/src/winio.c index f1f91c7e..8b19ffb9 100644 --- a/src/winio.c +++ b/src/winio.c @@ -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; -- 2.39.5