From ad8a02adf1a03e21acd37ab11f192d2dae5f4494 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. Change-Id: I2b375dfba1040ff96259e2b338b91b7cd8326d3e --- 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 ad18655..04f7c2f 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(); -- 2.7.4