From 3023789c09c6f11e0144cb16d07baf77190013e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=93=E8=88=AA?= <1210603696@qq.com> Date: Wed, 24 Dec 2014 10:30:25 +0800 Subject: [PATCH] bug fix --- TinySTL/String.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TinySTL/String.h b/TinySTL/String.h index b13f4f1..dbacf1d 100644 --- a/TinySTL/String.h +++ b/TinySTL/String.h @@ -472,7 +472,10 @@ namespace TinySTL{ return *this; } string::iterator string::erase(iterator p){ - return erase(p, end()); + //return erase(p, end()); + //bug fix + //2014.12.24 + return erase(p, p + 1); } template string& string::replace(iterator i1, iterator i2,