summaryrefslogtreecommitdiff
path: root/src/update_objects.c
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-07-03 06:40:34 -0600
committerGitHub <noreply@github.com>2025-07-03 06:40:34 -0600
commit67090b39a764e8a77a95acf01a2d83959dad82c7 (patch)
treee60f7bc3b27412044b9a45d090cc32906aa64734 /src/update_objects.c
parent23b6478ce6ae4b264821e08875f17f80e6deec2e (diff)
Fix crash (#412)
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/update_objects.c')
-rw-r--r--src/update_objects.c4
1 files 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];
}