mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-22 08:50:48 +00:00
Changed G_LoadServerChangeFile from fixed buffer size to dynamic buffer size
This commit is contained in:
parent
02b60d67ca
commit
d3bd8eaf79
1 changed files with 2 additions and 2 deletions
|
@ -1100,9 +1100,9 @@ static void G_LoadServerChangeFile(void) {
|
|||
}
|
||||
|
||||
// TODO dynamic buffer size
|
||||
buffer = (char *)malloc(32000 * sizeof(char));
|
||||
buffer = (char *)malloc((file_len + 1) * sizeof(char));
|
||||
if(!buffer) {
|
||||
G_Printf(S_COLOR_RED "ERROR: Was unable to allocate %i bytes.\n", 32000 * sizeof(char) );
|
||||
G_Printf(S_COLOR_RED "ERROR: Was unable to allocate %i bytes.\n", (file_len + 1) * sizeof(char) );
|
||||
trap_FS_FCloseFile(f);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue