fixed fatal() call endwin() after noraw(), free curbp and scrap on exit of main.

master
Hugh Barney 6 years ago
parent 4b384b1742
commit e266221618

@ -15,7 +15,7 @@
#include <termios.h>
#define E_NAME "zep"
#define E_VERSION "v1.2"
#define E_VERSION "v1.3"
#define E_LABEL "Zep:"
#define B_MODIFIED 0x01 /* modified buffer */
@ -99,8 +99,8 @@ void fatal(char *msg)
{
move(LINES-1, 0);
refresh();
endwin();
noraw();
endwin();
printf("\n" E_NAME " " E_VERSION ": %s\n", msg);
exit(1);
}
@ -752,6 +752,9 @@ int main(int argc, char **argv)
}
}
if (scrap != NULL) free(scrap);
if (curbp != NULL) free(curbp);
move(MSGLINE, 0);
refresh();
noraw();

Loading…
Cancel
Save