[Groonga-commit] groonga/groonga at e8db11c [master] grn_ts: fix a bug that fails parsing sign operators

Back to archive index

susumu.yata null+****@clear*****
Sat Sep 26 12:59:13 JST 2015


susumu.yata	2015-09-26 12:59:13 +0900 (Sat, 26 Sep 2015)

  New Revision: e8db11c6cfc68e650774487596de99f81e5629a4
  https://github.com/groonga/groonga/commit/e8db11c6cfc68e650774487596de99f81e5629a4

  Message:
    grn_ts: fix a bug that fails parsing sign operators

  Modified files:
    lib/ts.c

  Modified: lib/ts.c (+2 -1)
===================================================================
--- lib/ts.c    2015-09-26 12:57:37 +0900 (894cbdd)
+++ lib/ts.c    2015-09-26 12:59:13 +0900 (aad43b0)
@@ -5024,7 +5024,8 @@ grn_ts_expr_parser_tokenize_next(grn_ctx *ctx, grn_ts_expr_parser *parser,
     return grn_ts_expr_parser_tokenize_end(ctx, parser, rest, token);
   }
   if (grn_ts_byte_is_decimal(rest.ptr[0]) ||
-      ((rest.size >= 2) && grn_ts_byte_is_decimal(rest.ptr[1]))) {
+      ((rest.size >= 2) && (rest.ptr[0] == '.') &&
+       grn_ts_byte_is_decimal(rest.ptr[1]))) {
     return grn_ts_expr_parser_tokenize_number(ctx, parser, rest, token);
   }
   if (rest.ptr[0] == '"') {
-------------- next part --------------
HTML����������������������������...
다운로드 



More information about the Groonga-commit mailing list
Back to archive index