Complete.Org: Mailing Lists: Archives: freeciv-dev: August 1999:
Re: [Freeciv-Dev] New bug at latest CVS.
Home

Re: [Freeciv-Dev] New bug at latest CVS.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Lindqvist Marko <caz@xxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: Re: [Freeciv-Dev] New bug at latest CVS.
From: Nicolas Brunel <brunel@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Aug 1999 21:02:29 +0000 (GMT)

>  GTK-client crashes when server shuts down.
> With my amiga it says:
>  "couldn't open logfile:<some random characters> for appending."
> 
> It doesn't matter if I have actually enabled logging or not.

I almost sure I'm the creator of this bug.
So try this patch and give me feedback.

Bye,

Index: client/gui-gtk/gui_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/gui-gtk/gui_main.c,v
retrieving revision 1.40
diff -u -r1.40 gui_main.c
--- gui_main.c  1999/08/10 08:07:44     1.40
+++ gui_main.c  1999/08/10 19:54:12
@@ -182,7 +182,7 @@
 **************************************************************************/
 static void parse_options(int argc, char **argv)
 {
-  char logfile[512]="";
+  char *logfile=NULL;
   char *option=NULL; /* really use as a pointer */
   int loglevel;
   int i;
@@ -221,7 +221,7 @@
       exit(0);
       }
     else if ((option = get_option("--log",argv,&i,argc)) != NULL)
-      strcpy(logfile,option);
+      logfile = strdup(option);
     else if ((option = get_option("--name",argv,&i,argc)) != NULL)
       strcpy(name, option);
     else if ((option = get_option("--port",argv,&i,argc)) != NULL)


[Prev in Thread] Current Thread [Next in Thread]