]> Sergey Matveev's repositories - nnn.git/commit
Fix check when char is unsigned (#665)
authorSijmen J. Mulder <ik@sjmulder.nl>
Tue, 23 Jun 2020 23:05:42 +0000 (01:05 +0200)
committerGitHub <noreply@github.com>
Tue, 23 Jun 2020 23:05:42 +0000 (04:35 +0530)
commit235eb296149ff1d16accadc37c52542b7f18ef2d
treeefcd7dee312154232e3b62d58ead9f6a6535fa35
parent3686ef756a3cde8d58d8c9d8dac48863846ac9dd
Fix check when char is unsigned (#665)

If char is unsigned (as on ARM) subtracting a larger number would
result in a wrap around, not a negative value.

  src/nnn.c: In function 'readpipe':
  src/nnn.c:4325:11: warning: comparison is always false due to limited
  range of data type [-Wtype-limits]

     if (ctx < 0 || ctx > CTX_MAX)
             ^
src/nnn.c