examples: fix wrong data size conversion.

pointer size becomes 32 to 64 bits up to machines.
it has to be 32 bits.
This commit is contained in:
Hermet Park 2021-05-01 12:48:08 +09:00
parent 1d923a8632
commit 2bd07c050c

View file

@ -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<char *>(data), sizeof (data) * 200 * 300);
file.read(reinterpret_cast<char *>(data), sizeof (uint32_t) * 200 * 300);
file.close();
auto image = tvg::Picture::gen();