Skip null bytes from the output
authorJakub Skoczen <jakub@indexdata.dk>
Sun, 16 Mar 2014 00:56:56 +0000 (01:56 +0100)
committerJakub Skoczen <jakub@indexdata.dk>
Sun, 16 Mar 2014 00:56:56 +0000 (01:56 +0100)
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();