summaryrefslogtreecommitdiff
path: root/qte/qte-2.3.8-snapshot/fix-qgfxraster.patch
blob: 3c107e8eaef7089295f8461bb9e7389275403f23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- qt-2.3.7/src/kernel/qgfxraster_qws.cpp~fix-qgfxraster
+++ qt-2.3.7/src/kernel/qgfxraster_qws.cpp
@@ -3876,14 +3876,14 @@
 	for( loopc2=0;loopc2<frontadd;loopc2++ )
 	    *(alphaptr++)=get_value_32(16,(unsigned char **)&temppos);
 
-	PackType temp2;
-	unsigned char * cp;
+	volatile PackType temp2;
+	volatile unsigned short int * cp;
 	for( loopc2=0;loopc2<count;loopc2++ ) {
-	    temp2=*((PackType *)temppos);
-	    cp=(unsigned char *)&temp2;
-	    *(alphaptr++)=get_value_32(16,&cp);
-	    *(alphaptr++)=get_value_32(16,&cp);
-	    temppos += 2;
+           temp2=*reinterpret_cast<PackType *>(temppos);
+           cp=reinterpret_cast<volatile unsigned short int *>(&temp2);
+           *(alphaptr++)=qt_conv16ToRgb(*cp);
+           cp++;
+           *(alphaptr++)=qt_conv16ToRgb(*cp);
 	}
 
 	for( loopc2=0;loopc2<backadd;loopc2++ )