summaryrefslogtreecommitdiff
path: root/src/sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sort.c')
-rw-r--r--src/sort.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c
index 06b0d95a1..13954cbbc 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -2214,7 +2214,9 @@ debug_key (struct line const *line, struct keyfield const *key)
char *tighter_lim = beg;
- if (key->month)
+ if (lim < beg)
+ tighter_lim = lim;
+ else if (key->month)
getmonth (beg, &tighter_lim);
else if (key->general_numeric)
ignore_value (strtold (beg, &tighter_lim));