mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #3212 from janisozaur/server-list
Allocate enough memory for server entries, fix #3144
This commit is contained in:
commit
12b39961af
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue