summaryrefslogtreecommitdiffstats
path: root/misc/scripts/copyright_headers.py
diff options
context:
space:
mode:
Diffstat (limited to 'misc/scripts/copyright_headers.py')
-rwxr-xr-xmisc/scripts/copyright_headers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/scripts/copyright_headers.py b/misc/scripts/copyright_headers.py
index 82a4477cc0..2b1201b3c0 100755
--- a/misc/scripts/copyright_headers.py
+++ b/misc/scripts/copyright_headers.py
@@ -69,11 +69,11 @@ for f in sys.argv[1:]:
# In a second pass, we skip all consecutive comment lines starting with "/*",
# then we can append the rest (step 2).
- with open(fname.strip(), "r") as fileread:
+ with open(fname.strip(), "r", encoding="utf-8") as fileread:
line = fileread.readline()
header_done = False
- while line.strip() == "": # Skip empty lines at the top
+ while line.strip() == "" and line != "": # Skip empty lines at the top
line = fileread.readline()
if line.find("/**********") == -1: # Godot header starts this way