1.1 --- a/templates/native/int.c Mon Dec 12 00:40:54 2016 +0100
1.2 +++ b/templates/native/int.c Mon Dec 12 01:10:41 2016 +0100
1.3 @@ -18,7 +18,7 @@
1.4
1.5 #include <limits.h> /* INT_MAX, INT_MIN */
1.6 #include <math.h> /* ceil, log10, pow */
1.7 -#include <stdio.h> /* fdopen, snprintf */
1.8 +#include <stdio.h> /* fdopen, snprintf, strlen */
1.9 #include <errno.h> /* errno */
1.10 #include "native/common.h"
1.11 #include "types.h"
1.12 @@ -268,7 +268,7 @@
1.13 snprintf(s, n, "%d", i);
1.14
1.15 /* Return a new string. */
1.16 - return __new_str(s, n);
1.17 + return __new_str(s, strlen(s));
1.18 }
1.19
1.20 /* Module initialisation. */