[#542] Fix bug in `SizeInBytesSafe` function

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
pull/462/head
Anton Nikiforov 2023-07-31 16:56:11 +03:00 committed by Evgenii Stratonikov
parent b8052c794e
commit 9ca63ac8c3
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ func parseSizeInBytes(sizeStr string) uint64 {
if sizeStr[lastChar] == 'b' || sizeStr[lastChar] == 'B' {
lastChar--
}
if lastChar > 0 {
if lastChar >= 0 {
switch unicode.ToLower(rune(sizeStr[lastChar])) {
case 'k':
multiplier = 1 << 10