From 448779ad8ecdb3d7e95f0f475f566fe2eaf3c83f Mon Sep 17 00:00:00 2001 From: Thierry Crozat Date: Fri, 6 Oct 2017 00:58:32 +0100 Subject: LURE: Fix undefined behaviour in variadic functions Passing a type that undergoes default argument promotion as last argument of a variadic function results in undefined behaviour. --- engines/lure/res_struct.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/lure/res_struct.h') diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h index 685c55ab13..a8a5e5aca8 100644 --- a/engines/lure/res_struct.h +++ b/engines/lure/res_struct.h @@ -404,7 +404,7 @@ private: int _numParams; public: CharacterScheduleEntry() { _action = NONE; _parent = NULL; } - CharacterScheduleEntry(Action theAction, ...); + CharacterScheduleEntry(int theAction, ...); CharacterScheduleEntry(CharacterScheduleSet *parentSet, CharacterScheduleResource *&rec); CharacterScheduleEntry(CharacterScheduleEntry *src); @@ -412,7 +412,7 @@ public: Action action() { return _action; } int numParams() { return _numParams; } uint16 param(int index); - void setDetails(Action theAction, ...); + void setDetails(int theAction, ...); void setDetails2(Action theAction, int numParamEntries, uint16 *paramList); CharacterScheduleEntry *next(); CharacterScheduleSet *parent() { return _parent; } -- cgit v1.2.3