Skip null bytes from the output
[cql-java-moved-to-github.git] / src / main / java / org / z3950 / zing / cql / CQLLexer.java
index af61f3f..d7f3b77 100644 (file)
@@ -98,7 +98,8 @@ public class CQLLexer implements CQLTokenizer {
       buf.setLength(0); //reset buffer
       while (qi < ql
         && !strchr("()/<>= \t\r\n", qs.charAt(qi))) {
-        buf.append(qs.charAt(qi));
+        if (qs.charAt(qi) != '\0')
+          buf.append(qs.charAt(qi));
         qi++;
       }
       val = buf.toString();