mirror of
https://github.com/troglobit/editline.git
synced 2025-05-06 12:31:45 +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;
|
return;
|
||||||
|
|
||||||
Screen[ScreenCount] = c;
|
Screen[ScreenCount] = c;
|
||||||
if (++ScreenCount > ScreenSize) {
|
if (++ScreenCount >= ScreenSize) {
|
||||||
ScreenSize += SCREEN_INC;
|
ScreenSize += SCREEN_INC;
|
||||||
Screen = realloc(Screen, sizeof(char) * ScreenSize);
|
Screen = realloc(Screen, sizeof(char) * ScreenSize);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user