1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Allocate enough memory for server entries, fix #3144

This commit is contained in:
Michał Janiszewski
2016-04-01 19:57:18 +02:00
parent a1bdf3868b
commit 888f485690

View File

@@ -500,7 +500,7 @@ static char *freadstralloc(SDL_RWops *file)
if (SDL_RWread(file, &c, 1, 1) != 1) break;
if (c == 0) break;
if (length > capacity) {
if (length >= capacity) {
capacity *= 2;
buffer = realloc(buffer, capacity);
}