Fix idStr self-assignment

Was calling memcpy with overlapping parameters which is inefficient,
undefined behavior and Valgrind complained about it.
This commit is contained in:
Turo Lamminen 2017-03-04 11:30:07 +02:00 committed by Daniel Gibson
parent f26f70c717
commit 5da6374663

View file

@ -519,6 +519,10 @@ ID_INLINE char &idStr::operator[]( int index ) {
#pragma GCC diagnostic pop
ID_INLINE void idStr::operator=( const idStr &text ) {
if (&text == this) {
return;
}
int l;
l = text.Length();