]> granicus.if.org Git - icu/commitdiff
ICU-21833 Replace nullptr with 0 when assigning to UChar.
authorFredrik Roubert <roubert@google.com>
Fri, 3 Feb 2023 19:43:54 +0000 (20:43 +0100)
committerFredrik Roubert <fredrik@roubert.name>
Fri, 3 Feb 2023 21:04:36 +0000 (22:04 +0100)
This bug was originally introduced by ICU-4844 which erroneously
assigned NULL to UChar (which happens to work, even though it's
conceptually wrong).

icu4c/source/test/perf/collperf/collperf.cpp

index f27b8324bc2f2ad79fdc3491d64cf11e49a46a99..a99d1774e810d1956ca02c0f794f1a7b05ea9ebe 100644 (file)
@@ -769,7 +769,7 @@ public:
             } else {
                 icu_data->append_one(len);
                 memcpy(icu_data->last(), line, len * sizeof(UChar));
-                icu_data->last()[len -1] = nullptr;
+                icu_data->last()[len -1] = 0;
             }
         }
         if(U_FAILURE(status)) return;