summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-12-22 17:29:36 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-12-22 17:29:36 +0100
commit43adbc89e377c5f57fa7e2944c96dc605a2de96f (patch)
tree92b1ea68bf0af86a2c3de88886ae05e4fc064452
parent1925a08740689f49af5355110a7624f367fa1e8e (diff)
Fix off-by-one when extracting edits
-rw-r--r--monkey/edits.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/monkey/edits.py b/monkey/edits.py
index 447b71b..7ebb034 100644
--- a/monkey/edits.py
+++ b/monkey/edits.py
@@ -101,7 +101,7 @@ def get_edits_from_trace(trace, test, id):
elif action.offset == pos_end:
if (prev_action is None or
prev_action.type == 'insert' and prev_action.offset == action.offset-1 or
- prev_action.type == 'remove' and prev_action.offset == action.offset-1):
+ prev_action.type == 'remove' and prev_action.offset == action.offset):
orig_next = None
for terminal in start_tree.leaves():
if terminal.pos >= start_tokens[-1].pos + len(start_tokens[-1].val):