From ae791f20ea7239afe6d4e31de7dfc03b932c1be0 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Sun, 16 Mar 2014 01:56:56 +0100 Subject: [PATCH] Skip null bytes from the output --- src/main/java/org/z3950/zing/cql/CQLLexer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); -- 1.7.10.4