diff options
author | ENikS <evgeni@eniks.com> | 2014-09-23 18:33:16 -0400 |
---|---|---|
committer | ENikS <evgeni@eniks.com> | 2014-09-23 18:33:16 -0400 |
commit | cda45b5131c3546b870d8cea3191fb29df182b27 (patch) | |
tree | 5989123f3da969dca80f1e2ab271f9a9a6f27dbe | |
parent | 7a04f3d708faab4af1f1a6aeddc5a6a4db3849a5 (diff) |
Reinitializing list's begin iterator after few elements were erased from the head
-rw-r--r-- | src/script/script.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script.h b/src/script/script.h index 4c9ac74b78..b5336eb997 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -544,7 +544,7 @@ public: { while (end() - pc >= (long)b.size() && memcmp(&pc[0], &b[0], b.size()) == 0) { - erase(pc, pc + b.size()); + pc = erase(pc, pc + b.size()); ++nFound; } } |