[generator] Fix special characters in flight plan and settings

This commit is contained in:
fvantienen
2013-09-27 23:53:20 +02:00
parent 9add5d1c31
commit d3ac39c6fc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -800,7 +800,7 @@ let () =
List.iter
(fun s ->
let v = ExtXml.attrib s "name" in
lprintf "#define BLOCK_%s %d\n" (Str.global_replace (Str.regexp "[\\. ]") "_" v) !idx; incr idx) blocks;
lprintf "#define BLOCK_%s %d\n" (Str.global_replace (Str.regexp "[^A-Za-z0-9]") "_" v) !idx; incr idx) blocks;
lprintf "\n";
let index_of_waypoints =
+1 -1
View File
@@ -74,7 +74,7 @@ let print_dl_settings = fun settings ->
List.iter
(fun s ->
let v = ExtXml.attrib s "var" in
lprintf "#define SETTINGS_%s %d\n" (Str.global_replace (Str.regexp "\\.") "_" v) !idx; incr idx)
lprintf "#define SETTINGS_%s %d\n" (Str.global_replace (Str.regexp "[^A-Za-z0-9]") "_" v) !idx; incr idx)
settings;
lprintf "\n";