From eb8991da2f44a261609ad22c67f5be5de0b4d9b7 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 25 Apr 2021 10:24:28 +0100 Subject: [PATCH] Debug: Fix blank detection for persistent storage display --- src/newgrf_debug_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/newgrf_debug_gui.cpp b/src/newgrf_debug_gui.cpp index aa00d012ce..67a5bc8d60 100644 --- a/src/newgrf_debug_gui.cpp +++ b/src/newgrf_debug_gui.cpp @@ -526,7 +526,7 @@ struct NewGRFInspectWindow : Window { assert(psa_size % 4 == 0); uint last_non_blank = 0; for (uint j = 0; j < psa_size; j++) { - if (psa[j] != 0) last_non_blank = j; + if (psa[j] != 0) last_non_blank = j + 1; } const uint psa_limit = (last_non_blank + 3) & ~3; for (uint j = 0; j < psa_limit; j += 4, psa += 4) {