2003/12/02 18:33:33
[org.ibex.core.git] / src / org / xwt / util / Preprocessor.java
index 7290e14..e791a27 100644 (file)
@@ -148,7 +148,7 @@ PROCESS:
             } else if (trimmed.startsWith("//#switch")) {
                 int expStart = trimmed.indexOf('(') +1;
                 if (expStart < 1) { err.add(new Error("expected ( in #switch")); continue PROCESS; }
-                int expEnd = trimmed.indexOf(')');
+                int expEnd = trimmed.lastIndexOf(')');
                 if (expEnd == -1) { err.add(new Error("expected ) in #switch")); continue PROCESS; }
                 if (expEnd - expStart <= 1) { err.add(new Error("badly formed #switch statement")); continue PROCESS; }
                 String expr = trimmed.substring(expStart, expEnd);