From: Jakub Skoczen Date: Sun, 16 Mar 2014 00:56:56 +0000 (+0100) Subject: Skip null bytes from the output X-Git-Tag: v1.12~8 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=ae791f20ea7239afe6d4e31de7dfc03b932c1be0;p=cql-java-moved-to-github.git Skip null bytes from the output --- diff --git a/src/main/java/org/z3950/zing/cql/CQLLexer.java b/src/main/java/org/z3950/zing/cql/CQLLexer.java index af61f3f..d7f3b77 100644 --- a/src/main/java/org/z3950/zing/cql/CQLLexer.java +++ b/src/main/java/org/z3950/zing/cql/CQLLexer.java @@ -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();