summaryrefslogtreecommitdiffstats
path: root/external/libmwaw/ubsan.patch.0
blob: 4a7f210930049254438c5f2d1056d1d119e24722 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- src/lib/WingzParser.cxx
+++ src/lib/WingzParser.cxx
@@ -1120,7 +1120,7 @@
   MWAWColor colors[4];
   for (int i=0; i<4; ++i) { // font, back, unknown,font color
     val=(int) input->readULong(4);
-    int col=((val>>16)&0xFF)|(val&0xFF00)|((val<<16)&0xFFFFFF);
+    int col=((val>>16)&0xFF)|(val&0xFF00)|((val&0xFF)<<16);
     int high=(val>>24);
     colors[i]=MWAWColor(uint32_t(col)|0xFF000000);
     switch (i) {