Fix infinite while loop on empty added file.

This commit is contained in:
ajreckof 2024-04-12 19:38:37 +02:00
parent 029aadef56
commit d3d4b2e25e

View file

@ -73,7 +73,7 @@ for f in sys.argv[1:]:
line = fileread.readline() line = fileread.readline()
header_done = False 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() line = fileread.readline()
if line.find("/**********") == -1: # Godot header starts this way if line.find("/**********") == -1: # Godot header starts this way