diff options
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse.c b/src/parse.c index 99cb428..1006093 100644 --- a/src/parse.c +++ b/src/parse.c @@ -249,7 +249,7 @@ parse_filename(char *str, char *name, int chars_remaining) * Check if the filename buffer is out of space, preserving one * character to null terminate the string. */ - while (isalnum(*str) || strchr("\\/~_-+:.@", *str)) { + while (*str && (isalnum(*str) || strchr("\\/~_-+:.@", *str))) { chars_remaining--; |