be positive

This commit is contained in:
ngxson 2024-03-27 16:21:29 +01:00
parent b7cb3bb76f
commit 83f944c22d

View file

@ -67,7 +67,7 @@ static size_t split_str_to_n_bytes(std::string str) {
throw std::invalid_argument("error: supported units are M (megabytes) or G (gigabytes), but got: " + std::string(1, str.back()));
}
if (n <= 0) {
throw std::invalid_argument("error: size must be a negative value");
throw std::invalid_argument("error: size must be a positive value");
}
return n_bytes;
}