--- JSON-XS/XS.xs 2007/03/25 21:52:47 1.19 +++ JSON-XS/XS.xs 2007/03/25 21:53:19 1.20 @@ -965,7 +965,7 @@ dec.depth = 0; dec.maxdepth = DEC_DEPTH (dec.flags); - *SvEND (string) = 0; // this should basically be a nop, too + *dec.end = 0; // this should basically be a nop, too, but make sure its there sv = decode_sv (&dec); if (!sv)