--- JSON-XS/XS.xs 2009/09/08 18:00:03 1.101 +++ JSON-XS/XS.xs 2009/10/10 01:48:50 1.102 @@ -19,7 +19,8 @@ # define UTF8_MAXBYTES 13 #endif -#define IVUV_MAXCHARS (sizeof (UV) * CHAR_BIT * 28 / 93 + 2) +// three extra for rounding, sign, and end of string +#define IVUV_MAXCHARS (sizeof (UV) * CHAR_BIT * 28 / 93 + 3) #define F_ASCII 0x00000001UL #define F_LATIN1 0x00000002UL