fix for potential UB in CameraObjectReset2
This commit is contained in:
@@ -2453,7 +2453,15 @@ u8 CameraObjectGetFollowedObjectId(void)
|
||||
|
||||
void CameraObjectReset2(void)
|
||||
{
|
||||
#ifdef UBFIX
|
||||
struct Sprite* cameraObject = FindCameraObject();
|
||||
|
||||
if (cameraObject == NULL)
|
||||
return;
|
||||
cameraObject->data[1] = 2;
|
||||
#else
|
||||
FindCameraObject()->data[1] = 2;
|
||||
#endif
|
||||
}
|
||||
|
||||
u8 CopySprite(struct Sprite *sprite, s16 x, s16 y, u8 subpriority)
|
||||
|
||||
Reference in New Issue
Block a user