aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/src
diff options
context:
space:
mode:
authorMaria Christakis <[email protected]>2010-09-24 14:00:30 +0300
committerBjörn Gustavsson <[email protected]>2010-09-24 14:24:35 +0200
commit9f09d3d702d183ea47d6763b01ec8bd53268d12e (patch)
tree5ba3db44950cb7e0f2660ade8bf4cb537950c9e0 /lib/syntax_tools/src
parentdc7d2319691fa599717c066460cce53ce97b6b18 (diff)
downloadotp-9f09d3d702d183ea47d6763b01ec8bd53268d12e.tar.gz
otp-9f09d3d702d183ea47d6763b01ec8bd53268d12e.tar.bz2
otp-9f09d3d702d183ea47d6763b01ec8bd53268d12e.zip
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.
Diffstat (limited to 'lib/syntax_tools/src')
-rw-r--r--lib/syntax_tools/src/epp_dodger.erl2
1 files changed, 2 insertions, 0 deletions
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]) ->