diff options
| author | Shokuji <[email protected]> | 2019-04-16 09:47:32 +0900 |
|---|---|---|
| committer | Shokuji <[email protected]> | 2019-04-16 09:47:32 +0900 |
| commit | cdfeb53887d886adc10848e4a6e76c81fbd2a4c4 (patch) | |
| tree | 2bc17e536d396f7d20b8c9de4ce39c4f284d9256 /src/variable.c | |
| parent | 164985881b6d7d96218ec5cd986ca1bb4c919698 (diff) | |
| parent | 4e3e4260c3860e4c0c274f520744bdb7629ea9cd (diff) | |
| download | mruby-cdfeb53887d886adc10848e4a6e76c81fbd2a4c4.tar.gz mruby-cdfeb53887d886adc10848e4a6e76c81fbd2a4c4.zip | |
Merge branch 'master' into fix_mruby-io_test
Diffstat (limited to 'src/variable.c')
| -rw-r--r-- | src/variable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/variable.c b/src/variable.c index f97b09c52..983fe52f7 100644 --- a/src/variable.c +++ b/src/variable.c @@ -79,19 +79,19 @@ iv_put(mrb_state *mrb, iv_tbl *t, mrb_sym sym, mrb_value val) } /* Not found */ - t->size++; if (matched_seg) { matched_seg->key[matched_idx] = sym; matched_seg->val[matched_idx] = val; + t->size++; return; } seg = (segment*)mrb_malloc(mrb, sizeof(segment)); - if (!seg) return; seg->next = NULL; seg->key[0] = sym; seg->val[0] = val; t->last_len = 1; + t->size++; if (prev) { prev->next = seg; } |
