git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@1146
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
- Plug some memory leaks (Steven Kneizys).
read_file()
- Abort if we read a file of 0 lines (num_lines == 0), fixes BUG #70.
+ - Reverse tests to stop segfault on editing a new file of 0 lines
+ (David Benbennick).
- nano.c:
do_int_speller()
- Fix zombie processes and spelling buffer issues (Rocco Corsi)
buf[0] = 0;
}
- /* Did we try to insert a file of 0 bytes? */
- if (num_lines == 0)
- {
- statusbar(_("Read %d lines"), 0);
- return 1;
- }
-
/* Did we even GET a file if we don't already have one? */
if (totsize == 0 || fileptr == NULL) {
new_file();
return 1;
}
+ /* Did we try to insert a file of 0 bytes? */
+ if (num_lines == 0)
+ {
+ statusbar(_("Read %d lines"), 0);
+ return 1;
+ }
+
if (current != NULL) {
fileptr->next = current;
current->prev = fileptr;