From e00dfd2d0ac20c4e25f6452242f65cd82faf9538 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 23 Dec 2020 13:40:34 +0100 Subject: issue #8269 Make failed when building layout.cpp When a `\r` is present of the line ending of the file `layout_default.xml` this leads to unexpected results (the `\r` should not be present at all). By means of removing the `\r` this problem can be solved. --- src/to_c_cmd.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/to_c_cmd.py b/src/to_c_cmd.py index 52785f1..9510fd7 100755 --- a/src/to_c_cmd.py +++ b/src/to_c_cmd.py @@ -5,4 +5,4 @@ # place an escaped \n and " at the end of each line import sys for line in sys.stdin: - sys.stdout.write('"' + line.replace('\\','\\\\').replace('"','\\"').replace('\n','') + '\\n"\n') + sys.stdout.write('"' + line.replace('\\','\\\\').replace('"','\\"').replace('\n','').replace('\r','') + '\\n"\n') -- cgit v0.12