From 7f94b452fa114b8abde575105fa04169f3a55bb1 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Mon, 25 Feb 2013 17:37:49 -0800 Subject: [PATCH] update comments to make control code handling slightly more clear --- src/jsx_decoder.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsx_decoder.erl b/src/jsx_decoder.erl index 97b9b60..7600b07 100644 --- a/src/jsx_decoder.erl +++ b/src/jsx_decoder.erl @@ -515,7 +515,7 @@ string(<<237, X, _, Rest/binary>>, Handler, Acc, Stack, #config{replaced_bad_utf string(<<239, 191, X, Rest/binary>>, Handler, Acc, Stack, #config{replaced_bad_utf8=true} = Config) when X == 190; X == 191 -> string(Rest, Handler, ?acc_seq(Acc, 16#fffd), Stack, Config); -%% u+xfffe, u+xffff and other noncharacters +%% u+xfffe, u+xffff, control codes and other noncharacters string(<<_/utf8, Rest/binary>>, Handler, Acc, Stack, #config{replaced_bad_utf8=true} = Config) -> string(Rest, Handler, ?acc_seq(Acc, 16#fffd), Stack, Config); %% overlong encodings and missing continuations of a 2 byte sequence