diff --git a/icu4c/source/tools/toolutil/package.cpp b/icu4c/source/tools/toolutil/package.cpp index e58c6648b647..4192fc8e354e 100644 --- a/icu4c/source/tools/toolutil/package.cpp +++ b/icu4c/source/tools/toolutil/package.cpp @@ -1289,7 +1289,7 @@ void Package::setItemCapacity(int32_t max) Item* newItems = static_cast(uprv_malloc(max * sizeof(items[0]))); Item *oldItems = items; if(newItems == nullptr) { - fprintf(stderr, "icupkg: Out of memory trying to allocate %lu bytes for %d items\n", + fprintf(stderr, "icupkg: Out of memory trying to allocate %zu bytes for %d items\n", max * sizeof(items[0]), max); exit(U_MEMORY_ALLOCATION_ERROR); }