ICU-9021 Thread safety in DigitList::getDouble(), incorporate review comment.

X-SVN-Rev: 31162
This commit is contained in:
Andy Heninger 2011-12-20 19:29:26 +00:00
parent 7063bdb084
commit cec5a252fd

View File

@ -760,9 +760,9 @@ DigitList::set(double source)
// uprv_decNumberFromString() will parse the string expecting '.' as a
// decimal separator, however sprintf() can use ',' in certain locales.
// Overwrite a ',' with '.' here before proceeding.
char *decimalPt = strchr(rep, ',');
if (decimalPt != NULL) {
*decimalPt = '.';
char *decimalSeparator = strchr(rep, ',');
if (decimalSeparator != NULL) {
*decimalSeparator = '.';
}
// Create a decNumber from the string.