gdkselection-win32.c: Declare Variables At Top Of Block

...so that builds on Visual C++ can be fixed.
This commit is contained in:
Chun-wei Fan 2014-05-16 12:07:01 +08:00
parent ee06b932d3
commit 58b48fa209

View File

@ -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);