mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 04:21:24 +08:00
Fix sementation violation when displaying options
This commit is contained in:
parent
534b3897b8
commit
d2418161ad
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user