From e60e4750f880c9e0b81718410db73fcb20e358a5 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sun, 29 Apr 2018 16:09:15 +0000 Subject: [PATCH] Fix Fl::paste() in Fl_win32.cxx to paste GIF images. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@12879 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_win32.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx index 2c0f2339b..487515a90 100644 --- a/src/Fl_win32.cxx +++ b/src/Fl_win32.cxx @@ -780,7 +780,7 @@ void Fl::paste(Fl_Widget &receiver, int clipboard, const char *type) { } } else { // the system will decode a complex DIB - void *pDIBBits = (void*)(lpBI->bmiColors); + void *pDIBBits = (void*)(lpBI->bmiColors + 256); if (lpBI->bmiHeader.biCompression == BI_BITFIELDS) pDIBBits = (void*)(lpBI->bmiColors + 3); else if (lpBI->bmiHeader.biClrUsed > 0) pDIBBits = (void*)(lpBI->bmiColors + lpBI->bmiHeader.biClrUsed); Fl_Offscreen off = fl_create_offscreen(width, height);