[MPlayer-cvslog] r35455 - trunk/gui/ui/widgets.c
ib
subversion at mplayerhq.hu
Fri Nov 23 13:08:56 CET 2012
Author: ib
Date: Fri Nov 23 13:08:56 2012
New Revision: 35455
Log:
Prevent unintended sign extension from int to long on 64-bit machines.
If the property format is 32, the property data will be stored as
an array of longs (which on 64-bit machines will be 64-bit values
that are padded in the upper 4 bytes).
Modified:
trunk/gui/ui/widgets.c
Modified: trunk/gui/ui/widgets.c
==============================================================================
--- trunk/gui/ui/widgets.c Fri Nov 23 11:31:07 2012 (r35454)
+++ trunk/gui/ui/widgets.c Fri Nov 23 13:08:56 2012 (r35455)
@@ -18,6 +18,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -100,7 +101,7 @@ static int gtkLoadIcon(GtkIconTheme *the
data = gdk_pixbuf_get_pixels(pixbuf);
for (i = csize; i < guiIcon.collection_size; data += 4, i++)
- guiIcon.collection[i] = (data[3] << 24) | AV_RB24(data); // RGBA -> ARGB
+ guiIcon.collection[i] = (uint32_t)(data[3] << 24) | AV_RB24(data); // RGBA -> ARGB
}
g_object_unref(pixbuf);
More information about the MPlayer-cvslog
mailing list