]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/cintltst/sorttest.c
ICU-59173.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / sorttest.c
index f25c2acb1f77b6b6e68047e592a19baa112d4a62..3822ba1d59343521a670b2f5162b21604e2400dc 100644 (file)
@@ -1,3 +1,5 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /*
 *******************************************************************************
 *
@@ -6,7 +8,7 @@
 *
 *******************************************************************************
 *   file name:  sorttest.c
-*   encoding:   US-ASCII
+*   encoding:   UTF-8
 *   tab size:   8 (not used)
 *   indentation:4
 *
@@ -51,7 +53,7 @@ SortTest() {
 
     /* for medium, add bits that will not be compared, to test stability */
     for(i=0; i<UPRV_LENGTHOF(medium); ++i) {
-        medium[i]=(medium[i]<<4)|i;
+        medium[i]=(int32_t)((uint32_t)medium[i]<<4) | i;
     }
 
     /* sort medium array (stable) */