Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 240330
Collapse All | Expand All

(-)nano-2.1.5/src/nano.c.old (-2 / +8 lines)
Lines 127-133 Link Here
127
{
127
{
128
    filestruct *head, *copy;
128
    filestruct *head, *copy;
129
129
130
    assert(src != NULL);
130
    //assert(src != NULL);
131
    // escor - bug fix if we stand at the last line and cut the text
132
    if ( ! src )
133
	return NULL;
131
134
132
    copy = copy_node(src);
135
    copy = copy_node(src);
133
    copy->prev = NULL;
136
    copy->prev = NULL;
Lines 430-436 Link Here
430
433
431
    /* Put the top and bottom of the filestruct at copies of file_top
434
    /* Put the top and bottom of the filestruct at copies of file_top
432
     * and file_bot. */
435
     * and file_bot. */
433
    openfile->fileage = copy_filestruct(file_top);
436
437
    // escor - bug fix if we stand at the last line and cut the text
438
    if ( ! ( openfile->fileage = copy_filestruct(file_top) ) )
439
	return;
434
    openfile->filebot = openfile->fileage;
440
    openfile->filebot = openfile->fileage;
435
    while (openfile->filebot->next != NULL)
441
    while (openfile->filebot->next != NULL)
436
	openfile->filebot = openfile->filebot->next;
442
	openfile->filebot = openfile->filebot->next;

Return to bug 240330