PRIVATE: make sure symbols are resolved before using them

This commit is contained in:
neuromancer 2021-07-03 18:20:15 +02:00
parent 1f7fa6ea22
commit 3091add07b
2 changed files with 6 additions and 3 deletions

View file

@ -649,13 +649,14 @@ static void fPhoneClip(ArgArray args) {
}
int i = args[2].u.val;
int j = args[3].u.val;
Symbol *flag = g_private->maps.lookupVariable(args[4].u.sym->name);
if (i == j)
fAddSound(args[0].u.str, "PhoneClip", args[4].u.sym, args[5].u.val);
fAddSound(args[0].u.str, "PhoneClip", flag, args[5].u.val);
else {
assert(i < j);
Common::String sound = g_private->getRandomPhoneClip(args[0].u.str, i, j);
fAddSound(sound, "PhoneClip", args[4].u.sym, args[5].u.val);
fAddSound(sound, "PhoneClip", flag, args[5].u.val);
}
}