diff options
author | Eugene Sandulenko | 2016-02-22 18:28:07 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-23 11:18:43 +0100 |
commit | a2553489a66f6c0ccb937cdaaa643f9f037cf51b (patch) | |
tree | 37e0d4c5d8e559995353e9b1cc10312636df892a | |
parent | d7b008fa9a418951aaa86153aeeed7f5d3aa5e2c (diff) | |
download | scummvm-rg350-a2553489a66f6c0ccb937cdaaa643f9f037cf51b.tar.gz scummvm-rg350-a2553489a66f6c0ccb937cdaaa643f9f037cf51b.tar.bz2 scummvm-rg350-a2553489a66f6c0ccb937cdaaa643f9f037cf51b.zip |
WAGE: Added safeguard checks for operands
-rw-r--r-- | engines/wage/script.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/wage/script.h b/engines/wage/script.h index 1a7d07d29a..a91598094c 100644 --- a/engines/wage/script.h +++ b/engines/wage/script.h @@ -80,31 +80,37 @@ private: Operand(Obj *value, OperandType type) { _value.obj = value; + assert(type == OBJ); _type = type; } Operand(Chr *value, OperandType type) { _value.chr = value; + assert(type == CHR); _type = type; } Operand(Scene *value, OperandType type) { _value.scene = value; + assert(type == SCENE); _type = type; } Operand(int value, OperandType type) { _value.number = value; + assert(type == NUMBER); _type = type; } Operand(Common::String *value, OperandType type) { _value.string = value; + assert(type == STRING); _type = type; } Operand(Designed *value, OperandType type) { _value.inputClick = value; + assert(type == CLICK_INPUT); _type = type; } |