Commit 4ea5df3a authored by Chen Bill's avatar Chen Bill

fix Replay::OpenReplay

parent b7541e82
...@@ -136,7 +136,7 @@ bool Replay::OpenReplay(const wchar_t* name) { ...@@ -136,7 +136,7 @@ bool Replay::OpenReplay(const wchar_t* name) {
if(pheader.flag & REPLAY_COMPRESSED) { if(pheader.flag & REPLAY_COMPRESSED) {
comp_size = fread(comp_data, 1, MAX_COMP_SIZE, rfp); comp_size = fread(comp_data, 1, MAX_COMP_SIZE, rfp);
fclose(rfp); fclose(rfp);
if ((int)pheader.datasize < 0 && (int)pheader.datasize > MAX_REPLAY_SIZE) if (pheader.datasize > MAX_REPLAY_SIZE)
return false; return false;
replay_size = pheader.datasize; replay_size = pheader.datasize;
if (LzmaUncompress(replay_data, &replay_size, comp_data, &comp_size, pheader.props, 5) != SZ_OK) if (LzmaUncompress(replay_data, &replay_size, comp_data, &comp_size, pheader.props, 5) != SZ_OK)
......
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