1. Michał Górny
  2. mirage2iso

Commits

Michał Górny  committed d175069

Fix the suffix substitution in the output filename.

  • Participants
  • Parent commits 2168c79
  • Branches master

Comments (0)

Files changed (1)

File mirage2iso.c

View file
  • Ignore whitespace
 			}
 
 			outbuf = g_strdup_printf("%s.iso", newargv[0]);
+			if (ext) /* replace the extension in the duplicated string */
+				strcpy(&outbuf[ext - newargv[0] + 1], "iso");
+
 			if (!force) {
 				FILE *tmp = fopen(outbuf, "r");
 				if (tmp || errno != ENOENT) {