#989 Rename invalid idetifiers -Type - classes get lost if name exists: check existing constants in all abc tags

This commit is contained in:
honfika@gmail.com
2015-07-21 19:57:04 +02:00
parent e2038501a0
commit 2e5ae046a6
3 changed files with 24 additions and 8 deletions

View File

@@ -1829,6 +1829,19 @@ public final class SWF implements SWFContainerItem, Timelined {
getVariables(variables, actionsMap, functions, strings, usageTypes, asm, path);
}
public boolean as3StringConstantExists(String str) {
for (ABCContainerTag abcTag : getAbcList()) {
ABC abc = abcTag.getABC();
for (int i = 1; i < abc.constants.getStringCount(); i++) {
if (abc.constants.getString(i).equals(str)) {
return true;
}
}
}
return false;
}
public void fixAS3Code() {
for (ABCContainerTag abcTag : getAbcList()) {
ABC abc = abcTag.getABC();