mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-04 09:11:42 -04:00
Fix last argument in calls to dCamera_c::startEventCamera
The last argument is used as a char*, so we need to explicitly pass nullptr instead of 0 to ensure it has the correct type. This was causing crashes due to va_arg reading 8 bytes when only 4 were provided by the caller - if the out-of-bounds bytes are non-zero, the null check fails and it continues pulling args from beyond the argument buffer potentially triggering a segfault.
This commit is contained in:
@@ -164,7 +164,7 @@ int daObjTks_c::Create() {
|
||||
field_0xde1 = 1;
|
||||
|
||||
static const int m_cameraItemNum = 1;
|
||||
dCam_getBody()->StartEventCamera(18, fopAcM_GetID(this), "Type", 1, &m_cameraItemNum, 0);
|
||||
dCam_getBody()->StartEventCamera(18, fopAcM_GetID(this), "Type", 1, &m_cameraItemNum, nullptr);
|
||||
}
|
||||
|
||||
return phase_state;
|
||||
|
||||
Reference in New Issue
Block a user