forked from TrueCloudLab/frostfs-node
[#542] Fix bug in `SizeInBytesSafe` function
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>logs-linter
parent
b8052c794e
commit
9ca63ac8c3
|
@ -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 New Issue