Skip to content
Snippets Groups Projects
Commit cbbe667c authored by deuce's avatar deuce
Browse files

More word wrap fixes... bugs located by MCMLXXIX

parent 2e3b4cce
No related branches found
No related tags found
No related merge requests found
......@@ -1000,7 +1000,7 @@ js_word_wrap(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
}
t=l+1; /* Store start position of next line */
/* Move to start of whitespace */
while(l>0 && isspace(l))
while(l>0 && isspace(linebuf[l]))
l--;
outbuf_append(&outbuf, &outp, linebuf, l+1, &outbuf_size);
outbuf_append(&outbuf, &outp, "\r\n", 2, &outbuf_size);
......@@ -1013,9 +1013,9 @@ js_word_wrap(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
for(ocol=prefix_len+1,t=prefix_bytes; t<l; t++) {
switch(linebuf[t]) {
case '\x01': /* CTRL-A */
if(linebuf[t+1]!='\x01')
break;
t++;
if(linebuf[t]!='\x01')
break;
/* Fall-through */
default:
ocol++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment