Skip to content

Commit

Permalink
missing return found in replay compressed input reader
Browse files Browse the repository at this point in the history
lost and found
  • Loading branch information
poco0317 committed Sep 12, 2022
1 parent 8ba7066 commit 979e531
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Etterna/Models/HighScore/Replay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,12 @@ Replay::WriteInputData() -> bool
return false;
}
gzFile outfile = gzopen(path_z.c_str(), "wb");
if (outfile == nullptr) {
if (outfile == Z_NULL) {
Locator::getLogger()->warn("Failed to compress new input data "
"because {} could not be opened",
path_z.c_str());
fclose(infile);
return false;
}

char buf[128];
Expand Down Expand Up @@ -317,7 +319,7 @@ Replay::LoadInputData(const std::string& replayDir) -> bool
// human readable compression read-in
try {
gzFile infile = gzopen(path_z.c_str(), "rb");
if (infile == nullptr) {
if (infile == Z_NULL) {
Locator::getLogger()->warn("Failed to read input data at {}",
path_z.c_str());
return false;
Expand Down

0 comments on commit 979e531

Please sign in to comment.