From d6409b4490f0eaed8dec5a63d52c272193de73fd Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Mon, 16 Jan 2023 06:40:58 +0000 Subject: [PATCH] cpp_format_struct_table: Fix newlines on Windows --- tools/cpp_format_struct_table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cpp_format_struct_table.py b/tools/cpp_format_struct_table.py index bcd24e33c..35471a2a4 100755 --- a/tools/cpp_format_struct_table.py +++ b/tools/cpp_format_struct_table.py @@ -69,7 +69,7 @@ def Process(path: str): output_line = FormatLine(input[j], state, columns_state) output_lines.append(output_line) - with open(path, "w", encoding="utf-8") as f: + with open(path, "w", encoding="utf-8", newline='') as f: f.writelines(f"{line}\r\n" for line in output_lines)