mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
ULTIMA: Fix crashes in String::erase
This commit is contained in:
parent
05e252816a
commit
e8eb67f82e
@ -434,7 +434,7 @@ void String::deleteChar(uint32 p) {
|
||||
}
|
||||
|
||||
void String::erase(uint32 p, uint32 len) {
|
||||
if (p == npos)
|
||||
if (p == npos || len == 0)
|
||||
return;
|
||||
assert(p < _size);
|
||||
|
||||
|
@ -31,7 +31,6 @@ namespace Std {
|
||||
class string : public Common::String {
|
||||
public:
|
||||
typedef size_t size_type;
|
||||
static const size_type npos = (size_type) - 1;
|
||||
|
||||
struct reverse_iterator {
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user