patchutils.py: Improve handling of patches without linebreak at end of file in generate_ifdef_patch.

This commit is contained in:
Sebastian Lackner 2016-03-26 02:54:21 +01:00
parent 4b1c2ec4d6
commit 5e5229ecce

View File

@ -508,6 +508,8 @@ def generate_ifdef_patch(original, patched, ifdef):
line = diff.readline()
if line == "":
break
if line.startswith("\\ "):
continue
# Parse each hunk, and extract the srclines and dstlines. This algorithm is very
# similar to _read_single_patch.