File: 20-fix-invalid-conversion.diff

package info (click to toggle)
amoeba 1.1-31
  • links: PTS
  • area: contrib
  • in suites: bookworm, sid, trixie
  • size: 1,492 kB
  • sloc: cpp: 8,384; makefile: 140
file content (17 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Index: amoeba-1.1/image/load_image.cpp
===================================================================
--- amoeba-1.1.orig/image/load_image.cpp
+++ amoeba-1.1/image/load_image.cpp
@@ -24,10 +24,9 @@ Image *load_image(const char * const fil
 	 * a syntax of "image:alpha" indicates that the image data and the alpha data
 	 * is in separate files
 	 */
-	char *ptr = strchr(filename, ':');
-	if (ptr != NULL) {
+	if (strchr(filename, ':') != NULL) {
 		char *fn = strdup(filename);
-		ptr = strchr(fn, ':');
+		char *ptr = strchr(fn, ':');
 		ptr[0] = 0;
 		
 		Image *rgb = load_image(fn);