From 69924adf356c4377bef02d4a9a331db24701d188 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 9 Sep 2009 22:58:01 +0000 Subject: Fixed a minor assignment bug in shared core, assigning an object to itself was causing memory corruption, and fbasicstring is playing even nicer with shared core now. --- src/fbasicstring.h | 4 ++-- src/sharedcore.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fbasicstring.h b/src/fbasicstring.h index a654d91..e38e300 100644 --- a/src/fbasicstring.h +++ b/src/fbasicstring.h @@ -1408,12 +1408,12 @@ namespace Bu * Assignment operator. *@param rSrc (const MyType &) The FString to set your FString to. */ - MyType &operator=( const MyType &rSrc ) + /* MyType &operator=( const MyType &rSrc ) { set( rSrc ); return (*this); - } + } */ /** * Equals comparison operator. diff --git a/src/sharedcore.h b/src/sharedcore.h index 046e973..3dcdc12 100644 --- a/src/sharedcore.h +++ b/src/sharedcore.h @@ -42,6 +42,9 @@ namespace Bu SharedCore &operator=( const SharedCore &rhs ) { + if( core == rhs.core ) + return *this; + _softCopy( rhs ); return *this; } -- cgit v1.2.3