mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 04:48:21 -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:
@@ -577,7 +577,7 @@ void daNpcTkc_c::reset() {
|
||||
setAngle(fopAcM_searchPlayerAngleY(this));
|
||||
|
||||
static int const 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);
|
||||
} else if (parentActorID == fpcM_ERROR_PROCESS_ID_e) {
|
||||
home.pos.y += mpHIO->m.target_height;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user