summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cuchaz/enigma/mapping/SignatureUpdater.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/cuchaz/enigma/mapping/SignatureUpdater.java b/src/cuchaz/enigma/mapping/SignatureUpdater.java
index d1216bd..809473e 100644
--- a/src/cuchaz/enigma/mapping/SignatureUpdater.java
+++ b/src/cuchaz/enigma/mapping/SignatureUpdater.java
@@ -69,19 +69,32 @@ public class SignatureUpdater
69 throws IOException 69 throws IOException
70 { 70 {
71 // read all the characters in the buffer until we hit a ';' 71 // read all the characters in the buffer until we hit a ';'
72 // remember to treat generics correctly
72 StringBuilder buf = new StringBuilder(); 73 StringBuilder buf = new StringBuilder();
74 int depth = 0;
73 int i = -1; 75 int i = -1;
74 while( ( i = reader.read() ) != -1 ) 76 while( ( i = reader.read() ) != -1 )
75 { 77 {
76 char c = (char)i; 78 char c = (char)i;
77 79
78 if( c == ';' ) 80 if( c == '<' )
79 { 81 {
80 return buf.toString(); 82 depth++;
81 } 83 }
82 else 84 else if( c == '>' )
83 { 85 {
84 buf.append( c ); 86 depth--;
87 }
88 else if( depth == 0 )
89 {
90 if( c == ';' )
91 {
92 return buf.toString();
93 }
94 else
95 {
96 buf.append( c );
97 }
85 } 98 }
86 } 99 }
87 100