summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_JPEG_Image.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Fl_JPEG_Image.cxx b/src/Fl_JPEG_Image.cxx
index 384acd2a4..6dcf030b5 100644
--- a/src/Fl_JPEG_Image.cxx
+++ b/src/Fl_JPEG_Image.cxx
@@ -255,9 +255,8 @@ extern "C" {
static void jpeg_mem_src(j_decompress_ptr cinfo, const unsigned char *data)
{
- my_src_ptr src;
- cinfo->src = (struct jpeg_source_mgr *)malloc(sizeof(my_source_mgr));
- src = (my_src_ptr)cinfo->src;
+ my_src_ptr src = (my_source_mgr*)malloc(sizeof(my_source_mgr));
+ cinfo->src = &(src->pub);
src->pub.init_source = init_source;
src->pub.fill_input_buffer = fill_input_buffer;
src->pub.skip_input_data = skip_input_data;