From 205168429eee3f198994e49a3e36bef1ccfd7ca0 Mon Sep 17 00:00:00 2001 From: Kazuki Yamaguchi Date: Wed, 14 Sep 2016 03:38:14 +0900 Subject: string.c: add missing size_t cast * string.c (RESIZE_CAPA_TERM): Add missing size_t cast. This should have been done in r56157. --- string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/string.c b/string.c index 8a57bc9048..b4290c9330 100644 --- a/string.c +++ b/string.c @@ -128,7 +128,7 @@ VALUE rb_cSymbol; #define RESIZE_CAPA_TERM(str,capacity,termlen) do {\ if (STR_EMBED_P(str)) {\ if (!STR_EMBEDDABLE_P(capacity, termlen)) {\ - char *const tmp = ALLOC_N(char, (capacity)+termlen);\ + char *const tmp = ALLOC_N(char, (size_t)(capacity) + (termlen));\ const long tlen = RSTRING_LEN(str);\ memcpy(tmp, RSTRING_PTR(str), tlen);\ RSTRING(str)->as.heap.ptr = tmp;\ -- cgit v1.2.3