Merge pull request #30050 from njt1982/30050-identifier-fix

iOS export: invalid identifier, the character '-' is not allowed
This commit is contained in:
Rémi Verschelde 2019-06-25 13:30:54 +02:00 committed by GitHub
commit c93bea312f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
first = true; first = true;
continue; continue;
} }
if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '_')) { if (!((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-')) {
if (r_error) { if (r_error) {
*r_error = vformat(TTR("The character '%s' is not allowed in Identifier."), String::chr(c)); *r_error = vformat(TTR("The character '%s' is not allowed in Identifier."), String::chr(c));
} }
@ -137,7 +137,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform {
} }
return false; return false;
} }
if (first && c == '_') { if (first && c == '-') {
if (r_error) { if (r_error) {
*r_error = vformat(TTR("The character '%s' cannot be the first character in a Identifier segment."), String::chr(c)); *r_error = vformat(TTR("The character '%s' cannot be the first character in a Identifier segment."), String::chr(c));
} }