]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/toolutil/dbgutil.cpp
ICU-62123.0.1.tar.gz
[apple/icu.git] / icuSources / tools / toolutil / dbgutil.cpp
index d4c87735689961e9fd35104b9452d80193c91de9..a5a3f518bb67f1bd505903986f647696c4dd5f2b 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /********************************************************************
  * COPYRIGHT:
  * Copyright (c) 2007-2012, International Business Machines Corporation and
@@ -115,7 +117,7 @@ U_CAPI int32_t
 udbg_stoi(const UnicodeString &s)
 {
     char ch[256];
-    const UChar *u = s.getBuffer();
+    const UChar *u = toUCharPtr(s.getBuffer());
     int32_t len = s.length();
     u_UCharsToChars(u, ch, len);
     ch[len] = 0; /* include terminating \0 */
@@ -127,7 +129,7 @@ U_CAPI double
 udbg_stod(const UnicodeString &s)
 {
     char ch[256];
-    const UChar *u = s.getBuffer();
+    const UChar *u = toUCharPtr(s.getBuffer());
     int32_t len = s.length();
     u_UCharsToChars(u, ch, len);
     ch[len] = 0; /* include terminating \0 */