]> granicus.if.org Git - icu/commitdiff
ICU-13384 Fixing test failure from r40057
authorShane Carr <shane@unicode.org>
Wed, 4 Oct 2017 23:41:05 +0000 (23:41 +0000)
committerShane Carr <shane@unicode.org>
Wed, 4 Oct 2017 23:41:05 +0000 (23:41 +0000)
X-SVN-Rev: 40558

icu4c/source/i18n/number_decimalquantity.cpp

index 6598feaee545a44369bd990a98678541c1d12d72..7842b7eed3e3c564e0418812480ae206dbf23ffe 100644 (file)
@@ -1009,8 +1009,8 @@ UnicodeString DecimalQuantity::toNumberString() const {
         digits[i] = getDigitPos(precision - i - 1) + '0';
     }
     auto digits16 = new char16_t[precision + 11];
-    u_charsToUChars(digits, digits16, precision + 11);
     snprintf(digits + precision, 11, "E%d", scale);
+    u_charsToUChars(digits, digits16, precision + 11);
     UnicodeString ret(digits16);
     delete[] digits;
     delete[] digits16;