Contributed off-by-one fix for editline
authorMark Spencer <markster@digium.com>
Wed, 26 Mar 2003 22:37:33 +0000 (22:37 +0000)
committerMark Spencer <markster@digium.com>
Wed, 26 Mar 2003 22:37:33 +0000 (22:37 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@701 65c4cc65-6c06-0410-ace0-fbb531ad65f3

editline/hist.c

index 094a241..b9eb924 100755 (executable)
@@ -139,7 +139,7 @@ hist_get(EditLine *el)
        if (el->el_line.lastchar > el->el_line.buffer) {
                if (el->el_line.lastchar[-1] == '\n')
                        el->el_line.lastchar--;
        if (el->el_line.lastchar > el->el_line.buffer) {
                if (el->el_line.lastchar[-1] == '\n')
                        el->el_line.lastchar--;
-               if (el->el_line.lastchar[-1] == ' ')
+               if ((el->el_line.lastchar > el->el_line.buffer)&&(el->el_line.lastchar[-1] == ' ')) /* bill heckel */
                        el->el_line.lastchar--;
                if (el->el_line.lastchar < el->el_line.buffer)
                        el->el_line.lastchar = el->el_line.buffer;
                        el->el_line.lastchar--;
                if (el->el_line.lastchar < el->el_line.buffer)
                        el->el_line.lastchar = el->el_line.buffer;