mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-23 14:48:24 +00:00
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:
parent
1d923a8632
commit
2bd07c050c
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue