termpty: fix ubsan-detected issue

../src/bin/termpty.c:988:9: runtime error: implicit conversion
from type 'int' of value -1 (32-bit, signed) to type 'unsigned long'
changed the value to 18446744073709551615 (64-bit, unsigned)
This commit is contained in:
Boris Faure 2020-06-12 22:38:33 +02:00
parent 2d9d1c6a82
commit 6aff48abe1
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
1 changed files with 1 additions and 1 deletions

View File

@ -25,6 +25,6 @@ int64_t
termpty_backlog_memory_get(void);
#define BACKLOG_ROW_GET(Ty, Y) \
(&Ty->back[(Ty->backsize + ty->backpos - ((Y) - 1 )) % Ty->backsize])
(&Ty->back[(Ty->backsize - 1 + ty->backpos - Y) % Ty->backsize])
#endif