summaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c2
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--;