Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/release-macos.yml # src/company_gui.cpp # src/linkgraph/linkgraph.cpp # src/newgrf_debug_gui.cpp # src/strgen/strgen_base.cpp # src/timetable_gui.cpp
This commit is contained in:
@@ -159,7 +159,7 @@ struct FileStringReader : StringReader {
|
||||
void FileStringReader::HandlePragma(char *str)
|
||||
{
|
||||
if (!memcmp(str, "id ", 3)) {
|
||||
this->data.next_string_id = strtoul(str + 3, nullptr, 0);
|
||||
this->data.next_string_id = std::strtoul(str + 3, nullptr, 0);
|
||||
} else if (!memcmp(str, "name ", 5)) {
|
||||
strecpy(_lang.name, str + 5, lastof(_lang.name));
|
||||
} else if (!memcmp(str, "ownname ", 8)) {
|
||||
@@ -185,14 +185,14 @@ void FileStringReader::HandlePragma(char *str)
|
||||
strecpy(_lang.digit_decimal_separator, strcmp(str, "{NBSP}") == 0 ? NBSP : str, lastof(_lang.digit_decimal_separator));
|
||||
} else if (!memcmp(str, "winlangid ", 10)) {
|
||||
const char *buf = str + 10;
|
||||
long langid = strtol(buf, nullptr, 16);
|
||||
long langid = std::strtol(buf, nullptr, 16);
|
||||
if (langid > (long)UINT16_MAX || langid < 0) {
|
||||
error("Invalid winlangid %s", buf);
|
||||
}
|
||||
_lang.winlangid = (uint16)langid;
|
||||
} else if (!memcmp(str, "grflangid ", 10)) {
|
||||
const char *buf = str + 10;
|
||||
long langid = strtol(buf, nullptr, 16);
|
||||
long langid = std::strtol(buf, nullptr, 16);
|
||||
if (langid >= 0x7F || langid < 0) {
|
||||
error("Invalid grflangid %s", buf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user