time_zone_manager: Don't loop on zero

Avoid an infinite loop, trying to accumulate a value with zero.
This commit is contained in:
lat9nq 2023-05-25 23:44:34 -04:00
parent c90126ceba
commit 3d32ff15cd

View file

@ -142,6 +142,9 @@ static constexpr bool GetInteger(const char* name, int& offset, int& value, int
if (!IsDigit(temp)) {
return {};
}
if (temp == '0') {
return {};
}
do {
value = value * 10 + (temp - '0');
if (value > max) {