sort: allow 0 as key's end_char

This commit is contained in:
Jakob Kramer 2015-04-05 20:33:07 +02:00 committed by sin
parent bddb7200b8
commit 061932a31b

2
sort.c
View File

@ -161,7 +161,7 @@ parse_keydef(struct keydef *kd, char *s, int flags)
return -1;
if (*rest == '.') {
kd->end_char = strtol(rest+1, &rest, 10);
if (kd->end_char < 1)
if (kd->end_char < 0)
return -1;
}
if (parse_flags(&rest, &kd->flags, MOD_ENDB) < 0)