if (j != 0)
if (ch == ']')
    public String deparseString(String str)    {        // This function takes a visually formatted string (like the user        // input into the text editing box) and converts it into a string        // that is ready to be written directly to the ROM.        char[] buffer = new char[8192];        String newstr; // this gets allocated later        int pos = 0;        int bracketlevel = 0;        int ch;        int len = str.length();        for (int i = 0; i < len; i++)        {            if (str.charAt(i) == '[')            {                bracketlevel++;                continue;            }            if (str.charAt(i) == ']')            {                bracketlevel--;                continue;            }            if (bracketlevel < 0)            {                System.out.println("WARNING: Bracket error detected: " + str);                return null;            }            // if we're still inside brackets (if bracketlevel > 0),            // get everything up to and including the next space, or            // up to the next closing bracket.            if (bracketlevel > 0)            {                char[] t = new char[32];                int j = 0;                do                {                    ch = str.charAt(i++);                    if (ch == ']')                    {                        t[j] = 0;                        int a = Integer.parseInt(new String(t).trim(), 16) & 0xFF;                        buffer[pos++] = (char) a;                        j = 0;                        i -= 2;                        break;                    }                    if (ch == ' ' || ch == ']')                    {                        if (j != 0)                        {                            t[j] = 0;                            int a = Integer.parseInt(new String(t).trim(), 16) & 0xFF;                            buffer[pos++] = (char) a;                            j = 0;                        }                    }                    else                        t[j++] = (char) ch;                    if (j == 32)                        break;                }                while (ch != ']');            }            else                buffer[pos++] = (crdChr ? EbHackModule.simpRegToCreditsChar(str                    .charAt(i)) : (char) (str.charAt(i) + asciiOff));        }        if (bracketlevel != 0)        {            System.out.println("WARNING: Bracket error detected: " + str);            return null;        }        //buffer[pos++] = 0;        return new String(buffer, 0, pos);        //		char* newstr = new char[pos];        //		for(i = 0; i < pos; i++)        //			newstr[i] = buffer[i];        //        //		newstr[pos] = 0;        //        //		return newstr;    }