diff options
Diffstat (limited to 'drivers/png')
-rw-r--r-- | drivers/png/image_loader_png.cpp | 2 | ||||
-rw-r--r-- | drivers/png/png_driver_common.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/png/image_loader_png.cpp b/drivers/png/image_loader_png.cpp index 854c6706e6..ded6bbc53e 100644 --- a/drivers/png/image_loader_png.cpp +++ b/drivers/png/image_loader_png.cpp @@ -88,7 +88,7 @@ Vector<uint8_t> ImageLoaderPNG::lossless_pack_png(const Ref<Image> &p_image) { { // must be closed before call to image_to_png uint8_t *writer = out_buffer.ptrw(); - copymem(writer, "PNG ", 4); + memcpy(writer, "PNG ", 4); } Error err = PNGDriverCommon::image_to_png(p_image, out_buffer); diff --git a/drivers/png/png_driver_common.cpp b/drivers/png/png_driver_common.cpp index 9e848a2253..412e17c6b7 100644 --- a/drivers/png/png_driver_common.cpp +++ b/drivers/png/png_driver_common.cpp @@ -60,7 +60,7 @@ static bool check_error(const png_image &image) { Error png_to_image(const uint8_t *p_source, size_t p_size, bool p_force_linear, Ref<Image> p_image) { png_image png_img; - zeromem(&png_img, sizeof(png_img)); + memset(&png_img, 0, sizeof(png_img)); png_img.version = PNG_IMAGE_VERSION; // fetch image properties @@ -134,7 +134,7 @@ Error image_to_png(const Ref<Image> &p_image, Vector<uint8_t> &p_buffer) { ERR_FAIL_COND_V(source_image->is_compressed(), FAILED); png_image png_img; - zeromem(&png_img, sizeof(png_img)); + memset(&png_img, 0, sizeof(png_img)); png_img.version = PNG_IMAGE_VERSION; png_img.width = source_image->get_width(); png_img.height = source_image->get_height(); |