finally fix laptop build

This commit is contained in:
Till Wübbers
2025-03-16 01:01:29 +01:00
parent a0af22cea6
commit 442fd23a0b
3 changed files with 33 additions and 20 deletions

View File

@@ -49,8 +49,9 @@ namespace Game
long fileSize = ftell(file);
fseek(file, 0, SEEK_SET);
void* rawMem = AllocateScratch(fileSize + 1);
const bgfx::Memory* mem = bgfx::makeRef(rawMem, fileSize + 1);
long fileSizeX = appendZero ? fileSize + 1 : fileSize;
void* rawMem = AllocateScratch(fileSizeX);
const bgfx::Memory* mem = bgfx::makeRef(rawMem, fileSizeX);
fread(mem->data, 1, fileSize, file);
if (appendZero)
{