mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-21 23:38:49 -05:00
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>
This commit is contained in:
parent
54067c390f
commit
d4e5de4bf6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user