--- JSON-XS/XS.xs 2007/04/11 12:23:02 1.28 +++ JSON-XS/XS.xs 2007/05/09 15:34:04 1.29 @@ -984,6 +984,7 @@ dec_t dec; SV *sv; + SvGETMAGIC (string); SvUPGRADE (string, SVt_PV); if (flags & F_UTF8)