changeset 49:b3b7013d9228

pads2gpcb.c/decals.c: allow underscores in written decal file names
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 30 Jan 2016 17:38:47 +0000
parents c977d637f038
children c9acfeed99e6
files pads2gpcb/decals.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pads2gpcb/decals.c	Sat Jan 30 17:31:20 2016 +0000
+++ b/pads2gpcb/decals.c	Sat Jan 30 17:38:47 2016 +0000
@@ -270,7 +270,7 @@
 	dp = filename + 7;
 	for (cp = current_decal->name; *cp; ) {
 		c = *cp++;
-		if (isalnum(c) || c == '-' || c == '.')
+		if (isalnum(c) || c == '-' || c == '.' || c == '_')
 			*dp++ = c;
 		else {
 			sprintf(dp, "%%%02X", c);
@@ -285,6 +285,7 @@
 	}
 	write_gpcb_element(outf, current_decal->body, 0, "", "", "", 0);
 	fclose(outf);
+	printf("Written to %s\n", filename);
 	free(filename);
 }