mirror of
https://github.com/zeldaret/oot
synced 2026-09-04 02:19:37 -04:00
Document some bugs (#2806)
* `@bug UB` in Item_Give and Item_CheckObtainability * `@bug` on `envCtx->windSpeed` not initialized in Environment_Init
This commit is contained in:
@@ -370,6 +370,7 @@ void Environment_Init(PlayState* play2, EnvironmentContext* envCtx, s32 unused)
|
||||
envCtx->windDirection.x = 80;
|
||||
envCtx->windDirection.y = 80;
|
||||
envCtx->windDirection.z = 80;
|
||||
//! @bug envCtx->windSpeed is not initialized.
|
||||
|
||||
envCtx->lightBlendEnabled = false;
|
||||
envCtx->lightSettingOverride = LIGHT_SETTING_OVERRIDE_NONE;
|
||||
|
||||
@@ -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]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user