GetMember needs to support string coercions (e.g. `array[1]` should work)

This commit is contained in:
David Wendt 2019-09-25 20:19:13 -04:00 committed by Mike Welsh
parent deecd85c81
commit 171cb9f014
1 changed files with 2 additions and 2 deletions

View File

@ -745,9 +745,9 @@ impl<'gc> Avm1<'gc> {
fn action_get_member(&mut self, _context: &mut ActionContext) -> Result<(), Error> {
let name_val = self.pop()?;
let name = name_val.as_string()?;
let name = name_val.into_string();
let object = self.pop()?.as_object()?;
let value = object.read().get(name);
let value = object.read().get(&name);
self.push(value);
Ok(())