Commit 0d1582df authored by Custom2043's avatar Custom2043
Browse files

Fix number reading

parent fb2c7335
No preview for this file type
...@@ -39,11 +39,11 @@ public class NumberChar extends Token ...@@ -39,11 +39,11 @@ public class NumberChar extends Token
public char toChar() public char toChar()
{ {
if (this.base.index == 5) if (this.base.index == 4)
return (char)Integer.parseInt(this.total.substring(2), 2); return (char)Integer.parseInt(this.total.substring(2), 2);
else if (this.base.index == 7) else if (this.base.index == 6)
return (char)Integer.parseInt(this.total.substring(2), 16); return (char)Integer.parseInt(this.total.substring(2), 16);
else if (this.base.index == 9) else if (this.base.index == 8)
return (char)Integer.parseInt(this.total.substring(2), 8); return (char)Integer.parseInt(this.total.substring(2), 8);
return (char)(int)Integer.valueOf(this.total); return (char)(int)Integer.valueOf(this.total);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment