mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-19 02:38:32 +00:00
AGS: Fix String::ClipRight causing access violation for empty string
From upstream b1602096ec06aae8f045c0037298d61846111aa0
This commit is contained in:
parent
0f6ca133d2
commit
b615ca27b3
@ -497,7 +497,7 @@ void String::ClipMid(size_t from, size_t count) {
|
||||
}
|
||||
|
||||
void String::ClipRight(size_t count) {
|
||||
if (count > 0) {
|
||||
if (_len > 0 && count > 0) {
|
||||
count = Math::Min(count, _len);
|
||||
BecomeUnique();
|
||||
_len -= count;
|
||||
|
Loading…
x
Reference in New Issue
Block a user