diff options
| -rw-r--r-- | src/xplist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xplist.c b/src/xplist.c index 797d781..653cf49 100644 --- a/src/xplist.c +++ b/src/xplist.c | |||
| @@ -89,7 +89,7 @@ static char *format_string(const char *buf, size_t len, int cols, int depth) | |||
| 89 | new_buf[i * colw] = '\n'; | 89 | new_buf[i * colw] = '\n'; |
| 90 | for (j = 0; j < depth; j++) | 90 | for (j = 0; j < depth; j++) |
| 91 | new_buf[i * colw + 1 + j] = '\t'; | 91 | new_buf[i * colw + 1 + j] = '\t'; |
| 92 | memcpy(new_buf + i * colw + 1 + depth, buf + i * cols, (size_t)(i + 1) * cols <= len ? cols : len - i * cols); | 92 | memcpy(new_buf + i * colw + 1 + depth, buf + i * cols, (size_t)(i + 1) * cols <= len ? (size_t)cols : len - i * cols); |
| 93 | } | 93 | } |
| 94 | new_buf[len + (1 + depth) * nlines] = '\n'; | 94 | new_buf[len + (1 + depth) * nlines] = '\n'; |
| 95 | 95 | ||
