From 4950590628a912bb9584aa7dfee8d89d22b6c32c Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Thu, 25 Mar 2021 19:31:43 -0600 Subject: stop looking for prefixes if we've run out of text --- yapymake/makefile/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yapymake/makefile/__init__.py b/yapymake/makefile/__init__.py index 5e879d0..086ea2c 100644 --- a/yapymake/makefile/__init__.py +++ b/yapymake/makefile/__init__.py @@ -367,7 +367,7 @@ class CommandLine: tokens_iter = iter(line) first_token = next(tokens_iter) if isinstance(first_token, TextToken): - while first_token.text[0] in ['-', '@', '+']: + while len(first_token.text) > 0 and first_token.text[0] in ['-', '@', '+']: if first_token.text[0] == '-': self.ignore_errors = True elif first_token.text[0] == '@': -- cgit v1.2.3