time_zone_manager: Don't loop on zero
Avoid an infinite loop, trying to accumulate a value with zero.
This commit is contained in:
parent
c90126ceba
commit
3d32ff15cd
1 changed files with 3 additions and 0 deletions
|
@ -142,6 +142,9 @@ static constexpr bool GetInteger(const char* name, int& offset, int& value, int
|
||||||
if (!IsDigit(temp)) {
|
if (!IsDigit(temp)) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
if (temp == '0') {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
do {
|
do {
|
||||||
value = value * 10 + (temp - '0');
|
value = value * 10 + (temp - '0');
|
||||||
if (value > max) {
|
if (value > max) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue