[Groonga-commit] groonga/groonga at 78f5e1f [master] Fix a bug that grn_dat_scan() fails for empty grn_dat

Back to archive index

susumu.yata null+****@clear*****
Thu Jan 15 11:45:27 JST 2015


susumu.yata	2015-01-15 11:45:27 +0900 (Thu, 15 Jan 2015)

  New Revision: 78f5e1ff4e2de8f3b660d9d04dc51142753a65d2
  https://github.com/groonga/groonga/commit/78f5e1ff4e2de8f3b660d9d04dc51142753a65d2

  Message:
    Fix a bug that grn_dat_scan() fails for empty grn_dat
    
    GitHub: fix #273

  Modified files:
    lib/dat.cpp

  Modified: lib/dat.cpp (+4 -1)
===================================================================
--- lib/dat.cpp    2015-01-15 11:34:45 +0900 (5848e10)
+++ lib/dat.cpp    2015-01-15 11:45:27 +0900 (7e9d8b4)
@@ -683,7 +683,10 @@ grn_dat_scan(grn_ctx *ctx, grn_dat *dat, const char *str,
 
   grn::dat::Trie * const trie = static_cast<grn::dat::Trie *>(dat->trie);
   if (!trie) {
-    return -1;
+    if (str_rest) {
+      *str_rest = str + str_size;
+    }
+    return 0;
   }
 
   if (!max_num_scan_hits || !str_size) {
-------------- next part --------------
HTML����������������������������...
Download 



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