1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

use TTFFontSimSun for Chinese (Simplified) and fix config value reading

This commit is contained in:
IntelOrca
2015-08-10 12:31:39 +01:00
parent 9f96b87af2
commit b7f037fe60
2 changed files with 13 additions and 5 deletions

View File

@@ -524,7 +524,8 @@ bool config_get_property_name_value(const utf8string line, utf8 **propertyName,
}
lastC = c;
}
*valueSize = ch - *value - 1;
*valueSize = ch - *value;
if (quotes) (*valueSize)--;
return true;
}
@@ -632,7 +633,7 @@ static void config_read_properties(config_section_definition **currentSection, c
static bool config_read_enum(void *dest, int destSize, const utf8 *key, int keySize, config_enum_definition *enumDefinitions)
{
while (enumDefinitions->key != NULL) {
if (_strnicmp(enumDefinitions->key, key, keySize) == 0) {
if (strlen(enumDefinitions->key) == keySize && _strnicmp(enumDefinitions->key, key, keySize) == 0) {
memcpy(dest, &enumDefinitions->value.value_uint32, destSize);
return true;
}