From 2e81113c6ae200b2db49ec365438df16fbe52ab9 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 3 Jul 2016 23:14:40 +0100 Subject: [PATCH] Random number generation for account directories wasn't working properly. --- source/frmNewAccount.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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__) -- 2.39.5