aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/src/observer_lib.erl
diff options
context:
space:
mode:
authorSiri Hansen <[email protected]>2017-11-06 14:11:50 +0100
committerSiri Hansen <[email protected]>2017-11-06 14:11:50 +0100
commitde48cf9a757c329dda26875f8cf7dd7c4425fc04 (patch)
treee97f468c5393cc8fb70aaed1e4ec6985b3a92752 /lib/observer/src/observer_lib.erl
parent7cd0a910a3d171840991092e335e9a5b2aeee74e (diff)
parent513efb0bb34daecff84ac09fc36977c6682fa84d (diff)
downloadotp-de48cf9a757c329dda26875f8cf7dd7c4425fc04.tar.gz
otp-de48cf9a757c329dda26875f8cf7dd7c4425fc04.tar.bz2
otp-de48cf9a757c329dda26875f8cf7dd7c4425fc04.zip
Merge branch 'maint'
Diffstat (limited to 'lib/observer/src/observer_lib.erl')
-rw-r--r--lib/observer/src/observer_lib.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index e5ffe61d25..52e6c3e52a 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -810,7 +810,7 @@ progress_dialog_destroy({Dialog,_,_}) ->
make_obsbin(Bin,Tab) ->
Size = byte_size(Bin),
- Preview =
+ {Preview,PreviewBitSize} =
try
%% The binary might be a unicode string, in which case we
%% don't want to split it in the middle of a grapheme
@@ -819,14 +819,14 @@ make_obsbin(Bin,Tab) ->
PB1 = string:slice(Bin,0,PL1),
PS1 = byte_size(PB1) * 8,
<<P1:PS1>> = PB1,
- P1
+ {P1,PS1}
catch _:_ ->
%% Probably not a string, so just split anywhere
PS2 = min(Size, 10) * 8,
<<P2:PS2, _/binary>> = Bin,
- P2
+ {P2,PS2}
end,
Hash = erlang:phash2(Bin),
Key = {Preview, Size, Hash},
ets:insert(Tab, {Key,Bin}),
- ['#OBSBin',Preview,Size,Hash].
+ ['#OBSBin',Preview,PreviewBitSize,Size,Hash].