summaryrefslogtreecommitdiff
path: root/check-style.py
diff options
context:
space:
mode:
Diffstat (limited to 'check-style.py')
-rwxr-xr-xcheck-style.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/check-style.py b/check-style.py
index 7275af042..8721b8589 100755
--- a/check-style.py
+++ b/check-style.py
@@ -43,13 +43,13 @@ def reformat_chunks(chunks, rewrite):
with open(file) as f:
tmp = tempfile.NamedTemporaryFile()
tmp.write(b'/** *INDENT-OFF* **/\n')
- for i, line in enumerate(f):
- if i == start - 2:
+ for i, line in enumerate(f, start=1):
+ if i == start - 1:
tmp.write(b'/** *INDENT-ON* **/\n')
tmp.write(bytes(line, 'utf-8'))
- if i == end - 2:
+ if i == end - 1:
tmp.write(b'/** *INDENT-OFF* **/\n')
tmp.seek(0)