sort: allow 0 as key's end_char
This commit is contained in:
parent
bddb7200b8
commit
061932a31b
2
sort.c
2
sort.c
@ -161,7 +161,7 @@ parse_keydef(struct keydef *kd, char *s, int flags)
|
|||||||
return -1;
|
return -1;
|
||||||
if (*rest == '.') {
|
if (*rest == '.') {
|
||||||
kd->end_char = strtol(rest+1, &rest, 10);
|
kd->end_char = strtol(rest+1, &rest, 10);
|
||||||
if (kd->end_char < 1)
|
if (kd->end_char < 0)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (parse_flags(&rest, &kd->flags, MOD_ENDB) < 0)
|
if (parse_flags(&rest, &kd->flags, MOD_ENDB) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user