]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/extra/uconv/uwmsg.c
ICU-59117.0.1.tar.gz
[apple/icu.git] / icuSources / extra / uconv / uwmsg.c
index a182a719a67d1acd73d5da782b388edc833259a6..d5b0f627863448de39eb6658b25acb11894dad01 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 **********************************************************************
-* Copyright (C) 1998-2014, International Business Machines Corporation
+* Copyright (C) 1998-2016, International Business Machines Corporation
 * and others.  All Rights Reserved.
 **********************************************************************
 *
@@ -19,6 +21,7 @@
 #include "unicode/uwmsg.h"
 #include "unicode/ures.h"
 #include "unicode/putil.h"
+#include "cmemory.h"
 #include "cstring.h"
 
 #include <stdlib.h>
@@ -143,7 +146,7 @@ U_CFUNC int u_wmsg(FILE *fp, const char *tag, ... )
     }
 
 #if UCONFIG_NO_FORMATTING
-    resultLength = sizeof(gNoFormatting) / U_SIZEOF_UCHAR;
+    resultLength = UPRV_LENGTHOF(gNoFormatting);
     if((msgLen + resultLength) <= UPRV_LENGTHOF(result)) {
         memcpy(result, msg, msgLen * U_SIZEOF_UCHAR);
         memcpy(result + msgLen, gNoFormatting, resultLength);