mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
gdkselection-win32.c: Declare Variables At Top Of Block
...so that builds on Visual C++ can be fixed.
This commit is contained in:
parent
ee06b932d3
commit
58b48fa209
@ -1285,12 +1285,15 @@ _gdk_win32_selection_convert_to_dib (HGLOBAL hdata,
|
||||
|
||||
if (target == _image_bmp)
|
||||
{
|
||||
HGLOBAL hdatanew;
|
||||
SIZE_T size;
|
||||
guchar *ptr;
|
||||
|
||||
g_return_val_if_fail (GlobalSize (hdata) >= sizeof (BITMAPFILEHEADER), NULL);
|
||||
|
||||
/* No conversion is needed, just strip the BITMAPFILEHEADER */
|
||||
HGLOBAL hdatanew;
|
||||
SIZE_T size = GlobalSize (hdata) - sizeof (BITMAPFILEHEADER);
|
||||
guchar *ptr = GlobalLock (hdata);
|
||||
size = GlobalSize (hdata) - sizeof (BITMAPFILEHEADER);
|
||||
ptr = GlobalLock (hdata);
|
||||
|
||||
memmove (ptr, ptr + sizeof (BITMAPFILEHEADER), size);
|
||||
GlobalUnlock (hdata);
|
||||
|
Loading…
Reference in New Issue
Block a user