Open Ri0n opened 10 years ago
first I thought each new declaration creates new scope in its code block but then I checked this var i = 10; if (true) { var i = 20; }; alert(i); and it showed 20. so variable is really rewritten.
The joys of JavaScript, var
declarations are not block scoped. Please submit a pull request with the fix if you can, thanks.
I believe there is a mistake in avm2/amf.js::readAmf3Data::AMF3_OBJECT_MARKER there are two "for" loops in this section and internal one rewrites "j" variable of external.