Ticket #256: mc-4.7.0-pre4-backward-word-segfault.patch

File mc-4.7.0-pre4-backward-word-segfault.patch, 494 bytes (added by egmont, 15 years ago)

fix for segfault and other weird errors

  • src/widget.c

    diff -urp mc-4.7.0-pre4.orig/src/widget.c mc-4.7.0-pre4/src/widget.c
    old new backward_word (WInput *in) 
    14901490    for ( 
    14911491        p = in->buffer + str_offset_to_pos (in->buffer, in->point); 
    14921492        (p != in->buffer) && (p[0] == '\0'); 
    1493         p-- , in->point-- 
     1493        str_cprev_char (&p) , in->point-- 
    14941494    ); 
    14951495 
    14961496    while (p != in->buffer) {