Merge pull request #8090 from zmstone/0531-fix-ensure-binary-from-size-format

fix: ensure bin-string returned from mgmt size format function
This commit is contained in:
Zaiming (Stone) Shi 2022-05-31 14:09:31 +01:00 committed by GitHub
commit cd9811fe15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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])).