Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Random number generation for account directories wasn't working properly.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 3 Jul 2016 22:14:40 +0000 (23:14 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 3 Jul 2016 22:14:40 +0000 (23:14 +0100)
source/frmNewAccount.cpp

index 36a1f71..8b2a879 100644 (file)
@@ -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__)
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy