git-svn-id: svn://svn.savannah.gnu.org/nano/branches/nano_1_0_branch/nano@869
35c25a1d-7b9e-4130-9fde-
d3aeb78583b8
- Fixed null_at to ACTUALLY DO SOMETHING with its arg. Again,
this was causing nasty errors if the call to nrealloc moved
where the data was located.
+- cut.c:
+ cut_marked_segment()
+ - Fix off-by one in mem allocation.
- po/de.po:
- Updated German translation (Karl Eichwalder).
if (next == NULL)
return;
/* Now, paste bot[bot_x] into top[top_x] */
- tmpstr = nmalloc(strlen(top->data) + strlen(&bot->data[bot_x]));
+ tmpstr = nmalloc(top_x + strlen(&bot->data[bot_x]) + 1);
strncpy(tmpstr, top->data, top_x);
strcpy(&tmpstr[top_x], &bot->data[bot_x]);
free(top->data);