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
1 changed files with 1 additions and 1 deletions
|
@ -308,7 +308,7 @@ static const char *nth_column(const char *string)
|
||||||
int col;
|
int col;
|
||||||
|
|
||||||
ptr = prev = string;
|
ptr = prev = string;
|
||||||
for(col = 1; ptr && col <= opts.sortkey; col++) {
|
for(col = 0; ptr && col < opts.sortkey; col++) {
|
||||||
prev = ptr;
|
prev = ptr;
|
||||||
ptr = strchr(ptr, opts.delim);
|
ptr = strchr(ptr, opts.delim);
|
||||||
if(ptr) {
|
if(ptr) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue