[CF-Devel] RE: [Crossfire-cvs] CVS: crossfire/server (crash on wrong exit path)

Andreas Vogl andi.vogl at gmx.net
Sun Mar 11 18:18:41 CST 2001


On 05.03.2001, Mark W. (I suppose)

>
     
      Update of /cvsroot/crossfire/crossfire/server
     
     >
     
      In directory usw-pr-cvs1:/tmp/cvs-serv5819/server
     
     >
     
     
     >
     
      Modified Files:
     
     >
     
     	init.c main.c
     
     >
     
      Log Message:
     
     >
     
      MSW 2001/03/04:
     
     >
     
      [...]
     
     >
     
      server/main.c: Fix crash if map has an exit path yet that file does
     
     >
     
      not exist.  Give proper error message.
     
     
This patch doesn't seem to work. The server still crashes when
a player applies an exit with wrong exit-path.

Andreas V.

>
     
      Index: main.c
     
     >
     
      ===================================================================
     
     >
     
      RCS file: /cvsroot/crossfire/crossfire/server/main.c,v
     
     >
     
      retrieving revision 1.29
     
     >
     
      retrieving revision 1.30
     
     >
     
      diff -C2 -r1.29 -r1.30
     
     >
     
      *** main.c	2001/03/02 07:36:36	1.29
     
     >
     
      --- main.c	2001/03/05 02:05:19	1.30
     
     >
     
      ***************
     
     >
     
      *** 562,565 ****
     
     >
     
      --- 562,570 ----
     
     >
     
       		    newmap = ready_map_name(EXIT_PATH(exit_ob), 0);
     
     >
     
        	    }
     
     >
     
      + 	    if (!newmap) {
     
     >
     
      + 		new_draw_info_format(NDI_UNIQUE, 0, op, "The %s is closed.",
     
     exit_ob->name);
>
     
      + 		return;
     
     >
     
      + 	    }
     
     >
     
      +
     
     >
     
        	    /* This supports the old behaviour, but it really should not be
     
     used.
>
     
        	     * I will note for example that with this method, it is impossible
     
     to
>
     
      ***************
     
     >
     
      *** 575,582 ****
     
     >
     
        		    exit_ob->map?exit_ob->map->path:"(none)");
     
     >
     
        	    }
     
     >
     
      ! 	    if (newmap)
     
     >
     
      ! 		enter_map(op, newmap, x, y);
     
     >
     
      ! 	    else
     
     >
     
      ! 		new_draw_info_format(NDI_UNIQUE, 0, op, "The %s is closed.",
     
     exit_ob->name);
>
     
        	}
     
     >
     
        	/* For exits that cause damages (like pits) */
     
     >
     
      --- 580,584 ----
     
     >
     
        		    exit_ob->map?exit_ob->map->path:"(none)");
     
     >
     
        	    }
     
     >
     
      ! 	    enter_map(op, newmap, x, y);
     
     >
     
        	}
     
     >
     
        	/* For exits that cause damages (like pits) */
     
     
    


More information about the crossfire mailing list