summaryrefslogtreecommitdiff
path: root/x11-misc/rss-glx/files/rss-glx-0.9.1-macro-if-scope.patch
blob: 5044aae3191848ae88ca736ca05e1f0e0e77ec31 (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
Fix multistatement macro partially guarded by if

The code still works correctly by chance, but it performs redundant
calls to BZ2_bzBuffToBuffDecompress() and it's a horrible mess.

--- a/src/matrixview.c
+++ b/src/matrixview.c
@@ -248,8 +248,9 @@ void loadNextImage ()
 		GetExceptionInfo (&exception);
 #endif
 
-		if (!pics)
+		if (!pics) {
 			LOAD_TEXTURE (pics, cpics, cpics_compressedsize, cpics_size)
+		}
 
 		if ((text_x != 90) || (text_y != 70)) {
 			if (!pic)
@@ -279,8 +280,9 @@ void loadNextImage ()
 			DestroyImage (image);
 			DestroyImage (scaled_image);
 		} else {
-			if (!pics)
+			if (!pics) {
 				LOAD_TEXTURE (pics, cpics, cpics_compressedsize, cpics_size)
+			}
 
 			pic = (unsigned char *)(pics + ((random () & 15) * (text_x * text_y)));
 		}