aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index d464d5f562..950a4315aa 100644
--- a/string.c
+++ b/string.c
@@ -4872,7 +4872,7 @@ tr_trans(VALUE str, VALUE src, VALUE repl, int sflag)
}
}
else {
- int clen, tlen, max = RSTRING_LEN(str) * 1.2;
+ int clen, tlen, max = (int)(RSTRING_LEN(str) * 1.2);
int offset;
char *buf = ALLOC_N(char, max), *t = buf;