Unverified Commit 2f94ba1d authored by tryal-star's avatar tryal-star Committed by GitHub
Browse files

resize save buffer to avoid crashes

parent 4b97a356
......@@ -469,15 +469,16 @@ void CSystem::Reset(void)
size_t CSystem::ContextSize()
{
static UBYTE tempbuf[0x40000];
LSS_FILE fp;
const int max_size = 0x40000 + HANDY_AUDIO_BUFFER_SIZE;
fp.memptr = (UBYTE *) &tempbuf;
fp.memptr = (UBYTE *) malloc(max_size);
fp.index = 0;
fp.index_limit = 0x40000;
fp.index_limit = max_size;
ContextSave(&fp);
free(fp.memptr);
return fp.index;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment