[Groonga-commit] groonga/grnxx at 48216c5 [master] Fix a bug of BoolColumn.

Back to archive index

susumu.yata null+****@clear*****
Fri Jul 4 18:28:02 JST 2014


susumu.yata	2014-07-04 18:28:02 +0900 (Fri, 04 Jul 2014)

  New Revision: 48216c533cfe27ac9163a72190673e0e78bd937d
  https://github.com/groonga/grnxx/commit/48216c533cfe27ac9163a72190673e0e78bd937d

  Message:
    Fix a bug of BoolColumn.

  Modified files:
    lib/grnxx/column.cpp

  Modified: lib/grnxx/column.cpp (+2 -2)
===================================================================
--- lib/grnxx/column.cpp    2014-07-04 18:26:25 +0900 (c88aa09)
+++ lib/grnxx/column.cpp    2014-07-04 18:28:02 +0900 (a2b3f72)
@@ -189,9 +189,9 @@ unique_ptr<BoolColumn> BoolColumn::create(Error *error,
 BoolColumn::~BoolColumn() {}
 
 bool BoolColumn::set_default_value(Error *error, Int row_id) {
-  if (static_cast<size_t>(row_id / 64) >= values_.size()) {
+  if (row_id >= values_.size()) {
     try {
-      values_.resize((row_id / 64) + 1, false);
+      values_.resize(row_id + 1, false);
       return true;
     } catch (...) {
       GRNXX_ERROR_SET(error, NO_MEMORY, "Memory allocation failed");
-------------- next part --------------
HTML����������������������������...
Download 



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