# HG changeset patch # User Paul Boddie # Date 1481501441 -3600 # Node ID 77f8ab079c2ec8d433eb8e30cbc6557d018d2f28 # Parent 86cd43476c54e9d8b74c836cf18a6b3a1926afd6 Fixed the size information on serialised integer strings. diff -r 86cd43476c54 -r 77f8ab079c2e templates/native/int.c --- a/templates/native/int.c Mon Dec 12 00:40:54 2016 +0100 +++ b/templates/native/int.c Mon Dec 12 01:10:41 2016 +0100 @@ -18,7 +18,7 @@ #include /* INT_MAX, INT_MIN */ #include /* ceil, log10, pow */ -#include /* fdopen, snprintf */ +#include /* fdopen, snprintf, strlen */ #include /* errno */ #include "native/common.h" #include "types.h" @@ -268,7 +268,7 @@ snprintf(s, n, "%d", i); /* Return a new string. */ - return __new_str(s, n); + return __new_str(s, strlen(s)); } /* Module initialisation. */