aboutsummaryrefslogtreecommitdiff
path: root/yapymake
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-25 19:31:43 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-25 19:31:43 -0600
commit4950590628a912bb9584aa7dfee8d89d22b6c32c (patch)
treede89b2930b200fe9f94528bd6f2a592376ad7886 /yapymake
parentfd0433603e3af58935efcbc69d97a69b4f0f56d5 (diff)
downloadyapymake-4950590628a912bb9584aa7dfee8d89d22b6c32c.tar.gz
yapymake-4950590628a912bb9584aa7dfee8d89d22b6c32c.zip
stop looking for prefixes if we've run out of text
Diffstat (limited to 'yapymake')
-rw-r--r--yapymake/makefile/__init__.py2
1 files changed, 1 insertions, 1 deletions
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] == '@':