mirror of
https://gitlab.com/suyu-emu/suyu.git
synced 2024-03-15 23:15:44 +00:00
tz_manager: Fix off-by-one error
This commit is contained in:
parent
de1fe66d81
commit
63c51abe42
|
@ -130,10 +130,10 @@ static constexpr int GetQZName(const char* name, int offset, char delimiter) {
|
|||
}
|
||||
|
||||
static constexpr int GetTZName(const char* name, int offset) {
|
||||
for (char value{name[offset]};
|
||||
value != '\0' && !IsDigit(value) && value != ',' && value != '-' && value != '+';
|
||||
offset++) {
|
||||
value = name[offset];
|
||||
char c;
|
||||
|
||||
while ((c = name[offset]) != '\0' && !IsDigit(c) && c != ',' && c != '-' && c != '+') {
|
||||
++offset;
|
||||
}
|
||||
return offset;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue