From d4e5de4bf6b14a51f6ab23c1d80f38c2380917d8 Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Thu, 23 Apr 2015 16:45:51 +1000 Subject: pacsort: fix warning about signed overflow potential during comparison. Some crazy person assumed we would have fewer than INT_MAX columns. Signed-off-by: Allan McRae --- src/util/pacsort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/util/pacsort.c b/src/util/pacsort.c index 9d248fad..b0137ec4 100644 --- a/src/util/pacsort.c +++ b/src/util/pacsort.c @@ -308,7 +308,7 @@ static const char *nth_column(const char *string) int col; ptr = prev = string; - for(col = 1; ptr && col <= opts.sortkey; col++) { + for(col = 0; ptr && col < opts.sortkey; col++) { prev = ptr; ptr = strchr(ptr, opts.delim); if(ptr) { -- cgit v1.2.3-24-g4f1b