diff options
author | Stephen Warren <swarren@nvidia.com> | 2016-02-05 18:04:42 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-02-09 15:41:19 -0700 |
commit | d8926811fd8b0d48e3bc99627c95544013bd3a7b (patch) | |
tree | c6dd11c57f3478c0deceffe851678cb54912b46b /test | |
parent | 83357fd5c2ec11b45607dfe35ba5fe5e44d1eee0 (diff) | |
download | u-boot-imx-d8926811fd8b0d48e3bc99627c95544013bd3a7b.zip u-boot-imx-d8926811fd8b0d48e3bc99627c95544013bd3a7b.tar.gz u-boot-imx-d8926811fd8b0d48e3bc99627c95544013bd3a7b.tar.bz2 |
test/py: fix off-by-one error in spawn matching code
A regex match object's .end() value is already the index after the match,
not the index of the last character in the match, so there's no need to
add 1 to point past the match.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/py/u_boot_spawn.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/py/u_boot_spawn.py b/test/py/u_boot_spawn.py index 4b9e81a..3d9cde5 100644 --- a/test/py/u_boot_spawn.py +++ b/test/py/u_boot_spawn.py @@ -142,7 +142,7 @@ class Spawn(object): earliest_pi = pi if earliest_m: pos = earliest_m.start() - posafter = earliest_m.end() + 1 + posafter = earliest_m.end() self.before = self.buf[:pos] self.after = self.buf[pos:posafter] self.buf = self.buf[posafter:] |