Kouhei Sutou
null+****@clear*****
Mon Mar 27 14:56:58 JST 2017
Kouhei Sutou 2017-03-27 14:56:58 +0900 (Mon, 27 Mar 2017) New Revision: 379bbf5b4176505c84333dbb3e7795289f0921a1 https://github.com/groonga/groonga/commit/379bbf5b4176505c84333dbb3e7795289f0921a1 Message: mrb: fix wrong allocated size Modified files: lib/mrb/mrb_window_definition.c Modified: lib/mrb/mrb_window_definition.c (+2 -2) =================================================================== --- lib/mrb/mrb_window_definition.c 2017-03-27 14:46:11 +0900 (2c4a83a) +++ lib/mrb/mrb_window_definition.c 2017-03-27 14:56:58 +0900 (964a842) @@ -97,7 +97,7 @@ mrb_grn_window_definition_set_sort_keys(mrb_state *mrb, mrb_value self) } else { mrb_int i, n; n = RARRAY_LEN(mrb_keys); - definition->sort_keys = mrb_calloc(mrb, n, sizeof(grn_table_sort_key *)); + definition->sort_keys = mrb_calloc(mrb, n, sizeof(grn_table_sort_key)); for (i = 0; i < n; i++) { grn_table_sort_key *sort_key = DATA_PTR(RARRAY_PTR(mrb_keys)[i]); definition->sort_keys[i] = *sort_key; @@ -127,7 +127,7 @@ mrb_grn_window_definition_set_group_keys(mrb_state *mrb, mrb_value self) } else { mrb_int i, n; n = RARRAY_LEN(mrb_keys); - definition->group_keys = mrb_calloc(mrb, n, sizeof(grn_table_sort_key *)); + definition->group_keys = mrb_calloc(mrb, n, sizeof(grn_table_sort_key)); for (i = 0; i < n; i++) { grn_table_sort_key *group_key = DATA_PTR(RARRAY_PTR(mrb_keys)[i]); definition->group_keys[i] = *group_key; -------------- next part -------------- HTML����������������������������... 下載