Merge pull request #19 from jmjatlanta/jmj_sigsev

Fix sementation violation when displaying options
This commit is contained in:
Joachim Nilsson 2018-07-12 10:50:04 +02:00 committed by GitHub
commit 405f091888
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,7 +176,7 @@ static void tty_put(const char c)
return;
Screen[ScreenCount] = c;
if (++ScreenCount > ScreenSize) {
if (++ScreenCount >= ScreenSize) {
ScreenSize += SCREEN_INC;
Screen = realloc(Screen, sizeof(char) * ScreenSize);
}