From d2e21dcf5965d6e4056002e3779602ba3b9f117d Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 7 Mar 1999 17:15:22 +0000 Subject: [PATCH] fixed naming of weak identifiers git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@337 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/obfuscator/Identifier.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jode/jode/obfuscator/Identifier.java b/jode/jode/obfuscator/Identifier.java index 33fa47b..3e8655a 100644 --- a/jode/jode/obfuscator/Identifier.java +++ b/jode/jode/obfuscator/Identifier.java @@ -180,9 +180,9 @@ public abstract class Identifier { newAlias.setCharAt(pos, (char)(c+1)); break okay; } - newAlias.setCharAt(pos, '0'); + newAlias.setCharAt(pos, pos == 0 ? 'A': '0'); } else { - while (c++ < 255) { + while (c++ < 126) { if (Character.isJavaIdentifierPart(c)) { newAlias.setCharAt(pos, c); break okay; @@ -191,8 +191,8 @@ public abstract class Identifier { newAlias.setCharAt(pos, '0'); } } - newAlias.insert(0, renameRule == Obfuscator.RENAME_WEAK - ? 'A': '0'); + newAlias.append(renameRule == Obfuscator.RENAME_WEAK + && newAlias.length() == 0 ? "A": "0"); } while (false); Identifier ptr = this; while (ptr != null) {