Fixed one-off error

Needs another room to append an empty hash.
This commit is contained in:
Nobuyoshi Nakada 2019-09-14 21:09:39 +09:00
parent 9699a5c5bc
commit f41cd4ba43
No known key found for this signature in database
GPG Key ID: 4BC7D6DF58D8DF60

View File

@ -243,7 +243,7 @@ add_empty_keyword(int *argc, const VALUE **argv, int *kw_splat)
int n = *argc;
VALUE v;
VALUE *ptr;
ptr = rb_alloc_tmp_buffer2(&v, n, sizeof(VALUE));
ptr = rb_alloc_tmp_buffer2(&v, n+1, sizeof(VALUE));
memcpy(ptr, *argv, sizeof(VALUE)*n);
ptr[n] = rb_hash_new();
*argc = ++n;