Break out of infinite loop as intended (#5077)

This commit is contained in:
adrianeboyd 2020-03-03 12:29:05 +01:00 committed by GitHub
parent 697bec764d
commit d078b47c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1175,6 +1175,7 @@ cdef int set_children_from_heads(TokenC* tokens, int length) except -1:
heads_within_sents = _set_lr_kids_and_edges(tokens, length, loop_count)
if loop_count > 10:
user_warning(Warnings.W026)
break
loop_count += 1
# Set sentence starts
for i in range(length):