: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.

List of issuesList of issues

#543 parseInt() is sometimes assumed. toString() as well.
Author: user ether
Date created:
Type: bug
Visibility: Everybody
Assigned to: admin JPEXS
State: postponed Help

In a formula where a string is involved, and probably casted as int using "parseInt" native method, the generated code does not represent the use of this function, and thus output the following code: _loc2_ = (_loc5_.getValueFromHeaderByPos(2,"#")) - _loc5_.getCumulativeSecondsSinceSent(); The code is not compilable in this case because the function return a String. It should be: _loc2_ = parseInt(_loc5_.getValueFromHeaderByPos(2,"#")) - _loc5_.getCumulativeSecondsSinceSent(); Note the decompiler is wrapping the first stem in parenthesis, maybe parseInt is just missing. ---------- Same behavior happen to the toString() method, where an int, uint, Number is given in a function whose signature expect a String. Compiler throws an error if not casted to String in generated code.
admin
Hi, sorry for answering too late :-(. I tried to simulate it, but if I compile AS2 or AS3 file with FlashProCS6, the parseInt is decompiled correctly. Could you provide us sample SWF file with this? Or sample ActionScript source which can be compiled this way. Thanks.
Assigned:admin JPEXS
admin
I cannot reproduce this without sample SWF.
State: new→postponed
 
Google Translate: Translate to Czech Translate to Slovak Translate to Russian Translate to Hungarian Translate to Swedish Translate to French Translate to German Translate to Spanish Translate to Italian
Change style: oceanic classic