From ab6de199201f3cb292b986b2803d7d30b1485a47 Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 9 Feb 2015 23:31:24 -0500 Subject: work around bad tokens generated by procyon for now --- src/cuchaz/enigma/analysis/SourceIndex.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/cuchaz/enigma/analysis/SourceIndex.java') diff --git a/src/cuchaz/enigma/analysis/SourceIndex.java b/src/cuchaz/enigma/analysis/SourceIndex.java index b43ab61..e31b803 100644 --- a/src/cuchaz/enigma/analysis/SourceIndex.java +++ b/src/cuchaz/enigma/analysis/SourceIndex.java @@ -82,10 +82,11 @@ public class SourceIndex { // DEBUG // System.out.println( String.format( "%s \"%s\" region: %s", node.getNodeType(), name, region ) ); - // for tokens representing inner classes, make sure we only get the simple name - int pos = name.lastIndexOf('$'); - if (pos >= 0) { - token.end -= pos + 1; + // if the token has a $ in it, something's wrong. Ignore this token + if (name.lastIndexOf('$') >= 0) { + // DEBUG + System.err.println(String.format("WARNING: %s \"%s\" is probably a bad token. It was ignored", node.getNodeType(), name)); + return null; } return token; -- cgit v1.2.3