fixed off-by-one error, when parsing diffs