]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/utext.cpp
ICU-66108.tar.gz
[apple/icu.git] / icuSources / common / utext.cpp
index cd969e73bbc797183c2110003fae8ce001ba0e9b..0d766c693c7993eef8d043e10b0b5ca74a2a7b5b 100644 (file)
@@ -572,7 +572,7 @@ enum {
 
 struct ExtendedUText {
     UText          ut;
-    UAlignedMemory extension;
+    max_align_t    extension;
 };
 
 static const UText emptyText = UTEXT_INITIALIZER;
@@ -587,7 +587,7 @@ utext_setup(UText *ut, int32_t extraSpace, UErrorCode *status) {
         // We need to heap-allocate storage for the new UText
         int32_t spaceRequired = sizeof(UText);
         if (extraSpace > 0) {
-            spaceRequired = sizeof(ExtendedUText) + extraSpace - sizeof(UAlignedMemory);
+            spaceRequired = sizeof(ExtendedUText) + extraSpace - sizeof(max_align_t);
         }
         ut = (UText *)uprv_malloc(spaceRequired);
         if (ut == NULL) {