Browse Source

Terminate string only once

master
Arun Prakash Jana 6 years ago
parent
commit
6d9f4b3710
No known key found for this signature in database GPG Key ID: A75979F35C080412
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      src/nnn.c

+ 4
- 4
src/nnn.c View File

@@ -1884,10 +1884,10 @@ static char *unescape(const char *str, uint maxcols)


if (maxcols) { if (maxcols) {
len = lencount = wcswidth(wbuf, len); len = lencount = wcswidth(wbuf, len);
while (len > maxcols) { while (len > maxcols)
wbuf[--lencount] = L'\0'; len = wcswidth(wbuf, --lencount);
len = wcswidth(wbuf, lencount); wbuf[lencount] = L'\0';
}
} }


while (*buf) { while (*buf) {


||||||
x
 
000:0
Loading…
Cancel
Save