mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-17 22:58:26 +00:00
gems/png_image.h: fix context pointer handling
This patch fixes a problem that unsurfaced by the commit "menu_view: API transition", which changed the class layout of the 'Png_image' so that the 'Read_struct' pointer is no longer equal to the 'Png_image' pointer.
This commit is contained in:
committed by
Christian Helmuth
parent
e43da51bd6
commit
ddcc1cf6aa
@ -59,9 +59,9 @@ class Png_image
|
|||||||
|
|
||||||
static void callback(png_structp png_ptr, png_bytep dst, png_size_t len)
|
static void callback(png_structp png_ptr, png_bytep dst, png_size_t len)
|
||||||
{
|
{
|
||||||
Png_image *png = (Png_image *)png_get_io_ptr(png_ptr);
|
Read_struct &read_struct = *(Read_struct *)png_get_io_ptr(png_ptr);
|
||||||
Genode::memcpy(dst, png->_read_struct.data + png->_read_struct.pos, len);
|
Genode::memcpy(dst, read_struct.data + read_struct.pos, len);
|
||||||
png->_read_struct.pos += len;
|
read_struct.pos += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
png_structp png_ptr =
|
png_structp png_ptr =
|
||||||
|
Reference in New Issue
Block a user