Use unsigned types for offsets in expressions
commit43ae80ff9363aa2bbf0f71a3197dd33775e96136
authorPetr Tesarik <petr@tesarici.cz>
Fri, 18 May 2018 06:10:13 +0000 (18 08:10 +0200)
committerPetr Tesarik <petr@tesarici.cz>
Fri, 18 May 2018 06:10:13 +0000 (18 08:10 +0200)
tree44d920a9b43a49f57e4b04d24fe1cbe2c9f79d42
parentea1091687bc9e942af45b6c775afcbf7b0ed6564
Use unsigned types for offsets in expressions

Conversion routines cannot handle signed numbers correctly, because
the algorithm causes overflow, which is undefined behaviour for
signed integers.

It should be noted that signed conversion is currently broken on all
architectures that use a different binary representation than two's
complement, but since this bug affects only very few machines these
days, it has a low priority and is not addressed by this commit.

Signed-off-by: Petr Tesarik <petr@tesarici.cz>
libhed/expr.c
libhed/expr.h
src/ui/fileshow.c