mirror of
git://git.suckless.org/sbase
synced 2024-12-22 23:13:44 +00:00
Fix small issue in strings(1) loop
It wouldn't print the len'th character.
This commit is contained in:
parent
aa6ac30b81
commit
439bf8a157
12
strings.c
12
strings.c
@ -21,23 +21,23 @@ strings(FILE *fp, const char *fname, size_t len)
|
||||
off += bread;
|
||||
if (r == Runeerror)
|
||||
continue;
|
||||
else if (!isprintrune(r)) {
|
||||
if (!isprintrune(r)) {
|
||||
if (i > len)
|
||||
putchar('\n');
|
||||
i = 0;
|
||||
continue;
|
||||
}
|
||||
if (i < len) {
|
||||
if (i <= len) {
|
||||
rbuf[i++] = r;
|
||||
continue;
|
||||
} else if (i > len) {
|
||||
if (i < len)
|
||||
continue;
|
||||
} else {
|
||||
efputrune(&r, stdout, "<stdout>");
|
||||
continue;
|
||||
}
|
||||
printf(format, (long)off - i);
|
||||
for (i = 0; i < len; i++) {
|
||||
for (i = 0; i < len; i++)
|
||||
efputrune(rbuf + i, stdout, "<stdout>");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
free(rbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user