i swear i'm gonna kill him (#378)

Co-authored-by: rackover <roxanne@thegamebakers.com>
Co-authored-by: Edo <edoardo.sanguineti222@gmail.com>
This commit is contained in:
Louve 2022-07-21 14:33:12 +02:00 committed by GitHub
parent 50ff5fb713
commit e88811e980
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,14 +19,15 @@ namespace Components
{
auto* buf = AllocateFile(len + 1);
Game::FS_Read(buf, len, handle);
[[maybe_unused]] auto bytesRead = Game::FS_Read(buf, len, handle);
assert(bytesRead == len);
buf[len] = '\0';
Game::FS_FCloseFile(handle);
this->buffer = buf;
this->buffer.append(buf, len);
FreeFile(buf);
}
}