summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2015-04-23 08:45:51 +0200
committerAllan McRae <allan@archlinux.org>2015-05-12 06:00:54 +0200
commitd4e5de4bf6b14a51f6ab23c1d80f38c2380917d8 (patch)
tree70735cfeb422904887f19398c084b1f65a27b41a /src/util
parent54067c390f622807b78bc1a7950db113c3a8747c (diff)
downloadpacman-d4e5de4bf6b14a51f6ab23c1d80f38c2380917d8.tar.gz
pacman-d4e5de4bf6b14a51f6ab23c1d80f38c2380917d8.tar.xz
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 <allan@archlinux.org>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/pacsort.c2
1 files changed, 1 insertions, 1 deletions
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) {