Merge pull request #3686 from lambdageek/dev-format-printf
[mono.git] / mono / metadata / object.c
index 0603774589ed0b35babf69bd342d79ad46c03808..3ab92326b1b388bfdf002a7bc1074694047887c4 100644 (file)
@@ -5822,7 +5822,7 @@ mono_array_new_full_checked (MonoDomain *domain, MonoClass *array_class, uintptr
                o = (MonoObject *)mono_gc_alloc_vector (vtable, byte_len, len);
 
        if (G_UNLIKELY (!o)) {
-               mono_error_set_out_of_memory (error, "Could not allocate %i bytes", byte_len);
+               mono_error_set_out_of_memory (error, "Could not allocate %zd bytes", (gsize) byte_len);
                return NULL;
        }
 
@@ -5936,7 +5936,7 @@ mono_array_new_specific_checked (MonoVTable *vtable, uintptr_t n, MonoError *err
        o = (MonoObject *)mono_gc_alloc_vector (vtable, byte_len, n);
 
        if (G_UNLIKELY (!o)) {
-               mono_error_set_out_of_memory (error, "Could not allocate %i bytes", byte_len);
+               mono_error_set_out_of_memory (error, "Could not allocate %zd bytes", (gsize) byte_len);
                return NULL;
        }
 
@@ -6094,7 +6094,7 @@ mono_string_new_size_checked (MonoDomain *domain, gint32 len, MonoError *error)
        s = (MonoString *)mono_gc_alloc_string (vtable, size, len);
 
        if (G_UNLIKELY (!s)) {
-               mono_error_set_out_of_memory (error, "Could not allocate %i bytes", size);
+               mono_error_set_out_of_memory (error, "Could not allocate %zd bytes", size);
                return NULL;
        }