On Sat, 17 Mar 2007 18:05:38 -0400 Dennis Schridde <[EMAIL PROTECTED]> wrote: >Am Samstag, 17. März 2007 schrieb Dennis Schridde: >> Am Samstag, 17. März 2007 schrieb [EMAIL PROTECTED]: >> > Here is patch. Works on windows. Going to reset to linux to >test. >> > Should work now for both. >> > >> > I added resetConfig() routine, but I am not sure of default >case >> > should be? >> >> I wonder how this patch can fix the problem... >> >> main() calls loadConfig() which calls openWarzoneKey() which >calls >> registry_load() if that was not done before. The return value of >> registry_load() is discarded. After that loadConfig proceeds >with >> initializing game with the values from the config file or the >default >> values. At the end it calls closeWarzoneKey() which calls >registry_save() >> >> So actually it should not depend on the config file being >present and >> create it when it doesn't exist... >Just tested it here again. It does create the config file... No >crashes, no >empty files... Just a confused /dev/urandom...
It does a few loadConfig() calls. It still does create a 0 length filename, but then the routine that checks for this error had no code to fix problem. I added that code, so 2 cases are fixed, 0 length file or file not found. I have not chance to look at how old code was done in 2.0.2.3 and before on berlios. Maybe routine got dropped someplace? Other way to check would be to init everything on game start, then only change when loadConfig() is call. That work also. -- Click for free info on discount teaching degrees programs http://tagline.hushmail.com/fc/CAaCXv1VsnD6ZpOgS8t8CswacDz88a1H/ _______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev