From 9f09d3d702d183ea47d6763b01ec8bd53268d12e Mon Sep 17 00:00:00 2001 From: Maria Christakis Date: Fri, 24 Sep 2010 14:00:30 +0300 Subject: Fix crash in epp_dodger:tokens_to_string/1 Add a function clause in the epp_dodger:tokens_to_string/1 to avoid a crash in case the argument is a character. --- lib/syntax_tools/src/epp_dodger.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/syntax_tools') diff --git a/lib/syntax_tools/src/epp_dodger.erl b/lib/syntax_tools/src/epp_dodger.erl index 6b0f2034f8..9f6f7d815e 100644 --- a/lib/syntax_tools/src/epp_dodger.erl +++ b/lib/syntax_tools/src/epp_dodger.erl @@ -809,6 +809,8 @@ tokens_to_string([{atom,_,A} | Ts]) -> io_lib:write_atom(A) ++ " " ++ tokens_to_string(Ts); tokens_to_string([{string, _, S} | Ts]) -> io_lib:write_string(S) ++ " " ++ tokens_to_string(Ts); +tokens_to_string([{char, _, C} | Ts]) -> + io_lib:write_char(C) ++ " " ++ tokens_to_string(Ts); tokens_to_string([{float, _, F} | Ts]) -> float_to_list(F) ++ " " ++ tokens_to_string(Ts); tokens_to_string([{integer, _, N} | Ts]) -> -- cgit v1.2.3