aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_html_lib.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-12-04 14:52:33 +0100
committerDan Gudmundsson <[email protected]>2015-12-04 14:52:33 +0100
commit99f322eecb31ea23b7ff5dbb30c3b26f53bd6252 (patch)
tree9081f7457c37c7fc91426ec98ae563e222d905b0 /lib/observer/src/observer_html_lib.erl
parent7a13283ac6f4a7738dbe2a2ccfce392a820dca2a (diff)
downloadotp-99f322eecb31ea23b7ff5dbb30c3b26f53bd6252.tar.gz
otp-99f322eecb31ea23b7ff5dbb30c3b26f53bd6252.tar.bz2
otp-99f322eecb31ea23b7ff5dbb30c3b26f53bd6252.zip
observer: Handle truncated binaries
Crashed when term was displayed
Diffstat (limited to 'lib/observer/src/observer_html_lib.erl')
-rw-r--r--lib/observer/src/observer_html_lib.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/observer/src/observer_html_lib.erl b/lib/observer/src/observer_html_lib.erl
index 9d8c2d998c..f646f8ed3e 100644
--- a/lib/observer/src/observer_html_lib.erl
+++ b/lib/observer/src/observer_html_lib.erl
@@ -387,7 +387,9 @@ remove_lgt(Deep) ->
remove_lgt_1([$<,$<|Rest]) ->
[$>,$>|BinStr] = lists:reverse(Rest),
- replace_lgt(lists:reverse(BinStr)).
+ replace_lgt(lists:reverse(BinStr));
+remove_lgt_1(TruncBin) ->
+ TruncBin.
replace_lgt([$<|R]) ->
["&lt;"|replace_lgt(R)];