fix: ensure bin-string returned from mgmt size format function

This commit is contained in:
Zaiming (Stone) Shi 2022-05-31 11:04:09 +02:00
parent 06d2e1d05a
commit 6062bc248d
1 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,8 @@ kmg(Byte) when Byte > ?MB ->
kmg(Byte) when Byte > ?KB ->
kmg(Byte / ?KB, "K");
kmg(Byte) ->
Byte.
integer_to_binary(Byte).
kmg(F, S) ->
iolist_to_binary(io_lib:format("~.2f~ts", [F, S])).