mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8187772: JVM crash when currency set on MacOS 10.10 and earlier
Reviewed-by: naoto
This commit is contained in:
parent
5c7381d739
commit
e8c680e65b
1 changed files with 6 additions and 0 deletions
|
@ -113,6 +113,12 @@ char *getMacOSXLocale(int cat) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retVal != NULL) {
|
if (retVal != NULL) {
|
||||||
|
// convertToPOSIXLocale() does not expect any variant codes, so ignore
|
||||||
|
// '@' and anything following, if present.
|
||||||
|
char* rmAt = strchr(retVal, '@');
|
||||||
|
if (rmAt != NULL) {
|
||||||
|
*rmAt = '\0';
|
||||||
|
}
|
||||||
return strdup(convertToPOSIXLocale(retVal));
|
return strdup(convertToPOSIXLocale(retVal));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue