X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAccount.cpp;h=d601c4ac64a4ded51ea548d0c95a611fd7120cc1;hb=bbf8873b80baf3cb468ac12b3f62b0938320fef1;hp=31e99af8c54efcaecdcbdf601e2476dfac870321;hpb=e31b70325214fa5bdd433c1fd2aa96a1eb6c6684;p=lugaru.git diff --git a/Source/Account.cpp b/Source/Account.cpp index 31e99af..d601c4a 100644 --- a/Source/Account.cpp +++ b/Source/Account.cpp @@ -37,15 +37,15 @@ Account::Account(string n) { difficulty = 0; progress = 0; points = 0; - for(int i=0;i<50;highscore[i++] = 0); - for(int i=0;i<50;fasttime[i++] = 0); - for(int i=0;i<60;unlocked[i++] = 0); + memset(highscore, 0, sizeof(highscore)); + memset(fasttime, 0, sizeof(fasttime)); + memset(unlocked, 0, sizeof(unlocked)); campaignhighscore = 0; campaignfasttime = 0; campaignscore = 0; campaigntime = 0; campaignchoicesmade = 0; - for(int i=0;i<5000;campaignchoices[i++] = 0); + memset(campaignchoices, 0, sizeof(campaignchoices)); } Account* Account::add(string name) { @@ -169,7 +169,7 @@ void Account::saveFile(string filename, Account* accountactive) { int numaccounts; int j; - tfile=fopen(ConvertFileName(filename.c_str()), "wb" ); + tfile=fopen(ConvertFileName(filename.c_str(), "wb"), "wb" ); if(tfile) { printf("writing %d accounts :\n",getNbAccounts());