summaryrefslogtreecommitdiff
path: root/src/code/z_parameter.c
diff options
context:
space:
mode:
authorDragorn421 <Dragorn421@users.noreply.github.com>2026-08-29 16:14:49 +0200
committerGitHub <noreply@github.com>2026-08-29 16:14:49 +0200
commit63e2ae59ecb817a027df5f0eccb7024e2bdf79e3 (patch)
treeb7482691397e7c9a9e13c43a7a52726f3fc47d1d /src/code/z_parameter.c
parentb4c29fa50b8bd9ffb67138e56032c0432298d593 (diff)
Document some bugs (#2806)
* `@bug UB` in Item_Give and Item_CheckObtainability * `@bug` on `envCtx->windSpeed` not initialized in Environment_Init
Diffstat (limited to 'src/code/z_parameter.c')
-rw-r--r--src/code/z_parameter.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index 1eb2b08ab..cd50939be 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -1399,6 +1399,7 @@ u8 Item_Give(PlayState* play, u8 item) {
s16 slot;
s16 temp;
+ //! @bug UB: For items that are not inventory items, the SLOT macro indexes gItemSlots out of bounds.
slot = SLOT(item);
if (item >= ITEM_DEKU_STICKS_5) {
slot = SLOT(sExtraItemBases[item - ITEM_DEKU_STICKS_5]);
@@ -1888,9 +1889,11 @@ u8 Item_Give(PlayState* play, u8 item) {
u8 Item_CheckObtainability(u8 item) {
s16 i;
- s16 slot = SLOT(item);
+ s16 slot;
s16 temp;
+ //! @bug UB: For items that are not inventory items, the SLOT macro indexes gItemSlots out of bounds.
+ slot = SLOT(item);
if (item >= ITEM_DEKU_STICKS_5) {
slot = SLOT(sExtraItemBases[item - ITEM_DEKU_STICKS_5]);
}