diff options
author | Andrey Tsirulev <[email protected]> | 2013-02-16 15:57:42 +0400 |
---|---|---|
committer | Andrey Tsirulev <[email protected]> | 2013-02-16 16:11:34 +0400 |
commit | c80de7659717c3cb3d0ec4fa49e19124f4f957f8 (patch) | |
tree | 30d333fa007bcb48178f5a7f965ef259e35f3a2e /lib/observer | |
parent | 499eef0cd693b2f96ec19148d2f6666c3df7d834 (diff) | |
download | otp-c80de7659717c3cb3d0ec4fa49e19124f4f957f8.tar.gz otp-c80de7659717c3cb3d0ec4fa49e19124f4f957f8.tar.bz2 otp-c80de7659717c3cb3d0ec4fa49e19124f4f957f8.zip |
Fix observer table viewer crash on formatting improper lists
Observer table viewer crashes when attempts to display a term containing improper lists (e.g. dict). Quick way to reproduce: run
ets:insert(ets:new(test,[]), {1,[h|t]}).
then start observer and open test ETS in table viewer. Observer will crash.
Diffstat (limited to 'lib/observer')
-rw-r--r-- | lib/observer/src/observer_tv_table.erl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/observer/src/observer_tv_table.erl b/lib/observer/src/observer_tv_table.erl index 5d1ab2e946..83619414ad 100644 --- a/lib/observer/src/observer_tv_table.erl +++ b/lib/observer/src/observer_tv_table.erl @@ -784,8 +784,10 @@ format_list(List) -> make_list([Last]) -> [format(Last), $]]; +make_list([Head|Tail]) when is_list(Tail) -> + [format(Head), $,|make_list(Tail)]; make_list([Head|Tail]) -> - [format(Head), $,|make_list(Tail)]. + [format(Head), $|, format(Tail), $]]. map_printable_list([$\n|Cs]) -> [$\\, $n|map_printable_list(Cs)]; |