Fixed bug in FString copy constructor

This commit is contained in:
Markus Gans 2017-03-12 01:26:08 +01:00
parent 4107227119
commit 7ab1a6b353
2 changed files with 10 additions and 9 deletions

View File

@ -6,6 +6,7 @@
* FRect can now combine two FRect objects * FRect can now combine two FRect objects
* The FButtonGroup got the possibility of index access * The FButtonGroup got the possibility of index access
to a child button. to a child button.
* Fixed bug in FString copy constructor
2017-03-08 Markus Gans <guru.mail@muenster.de> 2017-03-08 Markus Gans <guru.mail@muenster.de>
* Improve input cursor positioning in FScrollView * Improve input cursor positioning in FScrollView

View File

@ -112,13 +112,13 @@ FString::FString (uInt len, char c)
//---------------------------------------------------------------------- //----------------------------------------------------------------------
FString::FString (const FString& s) // copy constructor FString::FString (const FString& s) // copy constructor
: string(new wchar_t[FWDBUFFER + s.length + 1]()) : string(0)
, length(s.length) , length(0)
, bufsize(FWDBUFFER + s.length + 1) , bufsize(0)
, c_string(0) , c_string(0)
{ {
if ( s.string ) if ( s.string )
std::wcscpy (string, s.string); _replace (s.string);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------