From: Steve Brokenshire Date: Sun, 3 Jul 2016 22:14:40 +0000 (+0100) Subject: Random number generation for account directories wasn't working properly. X-Git-Tag: release-0.14~15 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=2e81113c6ae200b2db49ec365438df16fbe52ab9;p=xestiaab%2F.git Random number generation for account directories wasn't working properly. --- diff --git a/source/frmNewAccount.cpp b/source/frmNewAccount.cpp index 36a1f71..8b2a879 100644 --- a/source/frmNewAccount.cpp +++ b/source/frmNewAccount.cpp @@ -476,7 +476,10 @@ void frmNewAccount::ProcessNext( wxCommandEvent& event ) wxString XestiaABDirectory; wxString AccountSettingsFile; //wxFile ASFile; - wxString RandomNumberSuffix = wxString::Format(wxT("%i"), rand() % 32767); + + srand(time(0)); + int RandomNumber = rand() % 32767; + wxString RandomNumberSuffix = wxString::Format(wxT("%i"), RandomNumber); bool DirectoryCreated = FALSE; #if defined(__HAIKU__)