From 2bd07c050cdde31785cbe780c5c1c52362dbeb9d Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Sat, 1 May 2021 12:48:08 +0900 Subject: [PATCH] examples: fix wrong data size conversion. pointer size becomes 32 to 64 bits up to machines. it has to be 32 bits. --- src/examples/InvMasking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/examples/InvMasking.cpp b/src/examples/InvMasking.cpp index ad186553..04f7c2f0 100644 --- a/src/examples/InvMasking.cpp +++ b/src/examples/InvMasking.cpp @@ -88,7 +88,7 @@ void tvgDrawCmds(tvg::Canvas* canvas) ifstream file(EXAMPLE_DIR"/rawimage_200x300.raw"); if (!file.is_open()) return; data = (uint32_t*) malloc(sizeof(uint32_t) * (200 * 300)); - file.read(reinterpret_cast(data), sizeof (data) * 200 * 300); + file.read(reinterpret_cast(data), sizeof (uint32_t) * 200 * 300); file.close(); auto image = tvg::Picture::gen();