Fix crash on cursor move near beginning of file
commitc676388a436851649599ddea4f57874d05b13eed
authorPetr Tesarik <petr@tesarici.cz>
Tue, 15 May 2018 04:56:37 +0000 (15 06:56 +0200)
committerPetr Tesarik <petr@tesarici.cz>
Tue, 15 May 2018 04:56:37 +0000 (15 06:56 +0200)
tree206a70040f24f5b57aba9fa8648bd084f8e3381b
parent44165a667dcae7e56533bdeaf3117546c1bf1335
Fix crash on cursor move near beginning of file

Since data->offset.pos is an unsigned type, the left side of the
comparison also gets promoted to an unsigned type, overflowing
negative numbers to large positive numbers. The viewport is then set
to a non-existent file position.

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