From 67090b39a764e8a77a95acf01a2d83959dad82c7 Mon Sep 17 00:00:00 2001 From: MegaMech Date: Thu, 3 Jul 2025 06:40:34 -0600 Subject: [PATCH] Fix crash (#412) Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com> --- src/update_objects.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/update_objects.c b/src/update_objects.c index 6164fe1d0..7b477881d 100644 --- a/src/update_objects.c +++ b/src/update_objects.c @@ -3254,11 +3254,11 @@ void verify_probability_table(char* str, const ItemProbabilities* probs, int16_t #ifndef _DEBUG return; #endif - u8 itemProbabilities[ITEM_MAX - 1]; + u8 itemProbabilities[ITEM_MAX]; getProbabilityArray(probs, itemProbabilities); size_t count = 0; - for (size_t i = 0; i < ITEM_MAX - 1; i++) { + for (size_t i = 0; i < ITEM_MAX; i++) { //printf("prob %d ", itemProbabilities[i]); count += itemProbabilities[i]; }