From cbc523e427fd26e81b6bc169b7903983431d7804 Mon Sep 17 00:00:00 2001 From: scawful Date: Wed, 31 Jan 2024 13:58:58 -0500 Subject: [PATCH] check the a and b map ptrs for nullptr rather than the vectors --- src/app/zelda3/overworld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/zelda3/overworld.cc b/src/app/zelda3/overworld.cc index d69c0443..2a405700 100644 --- a/src/app/zelda3/overworld.cc +++ b/src/app/zelda3/overworld.cc @@ -565,7 +565,7 @@ absl::Status Overworld::SaveOverworldMaps() { // Compress single_map_1 and single_map_2 auto a_char = gfx::lc_lz2::Compress(single_map_1.data(), 256, &size_a, 1); auto b_char = gfx::lc_lz2::Compress(single_map_2.data(), 256, &size_b, 1); - if (a.empty() || b.empty()) { + if (a_char == nullptr || b_char == nullptr) { return absl::AbortedError("Error compressing map gfx."); } // Copy the compressed data to a and b