mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +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:
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)
|
||||
{
|
||||
Png_image *png = (Png_image *)png_get_io_ptr(png_ptr);
|
||||
Genode::memcpy(dst, png->_read_struct.data + png->_read_struct.pos, len);
|
||||
png->_read_struct.pos += len;
|
||||
Read_struct &read_struct = *(Read_struct *)png_get_io_ptr(png_ptr);
|
||||
Genode::memcpy(dst, read_struct.data + read_struct.pos, len);
|
||||
read_struct.pos += len;
|
||||
}
|
||||
|
||||
png_structp png_ptr =
|
||||
|
Loading…
x
Reference in New Issue
Block a user