forked from TrueCloudLab/frostfs-node
[#542] Fix bug in SizeInBytesSafe
function
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
b8052c794e
commit
9ca63ac8c3
1 changed files with 1 additions and 1 deletions
|
@ -199,7 +199,7 @@ func parseSizeInBytes(sizeStr string) uint64 {
|
||||||
if sizeStr[lastChar] == 'b' || sizeStr[lastChar] == 'B' {
|
if sizeStr[lastChar] == 'b' || sizeStr[lastChar] == 'B' {
|
||||||
lastChar--
|
lastChar--
|
||||||
}
|
}
|
||||||
if lastChar > 0 {
|
if lastChar >= 0 {
|
||||||
switch unicode.ToLower(rune(sizeStr[lastChar])) {
|
switch unicode.ToLower(rune(sizeStr[lastChar])) {
|
||||||
case 'k':
|
case 'k':
|
||||||
multiplier = 1 << 10
|
multiplier = 1 << 10
|
||||||
|
|
Loading…
Reference in a new issue