[teeworlds] Re: Client crashes when changing map

  • From: Dominik Geyer <dominik.geyer@xxxxxx>
  • To: teeworlds@xxxxxxxxxxxxx
  • Date: Sat, 15 Nov 2008 16:13:21 +0100

Hi Thomas,

On Saturday 15 November 2008 16:04, Thomas wrote:
> By LordSkelethom

Thanks for your report. But please send a patch file instead of the modified
source-file. Below you see your diff (patch).

--- gamecontroller.cpp  2008-10-30 21:34:52.000000000 +0100
+++ gamecontroller.cpp.new      2008-11-15 16:07:26.000000000 +0100
@@ -213,7 +213,7 @@
        {
                dbg_msg("game", "rotating map to %s", map_wish);
                str_copy(config.sv_map, map_wish, sizeof(config.sv_map));
-               map_wish[0] = 0;
+               //map_wish[0] = 0;------------>by LordSkelethom
                return;
        }
        if(!strlen(config.sv_maprotation))

Could you please explain what you are actually doing there?
map_wish is a char-array which is "cleared" by setting first char to binary 
zero ('\0').

Even if this modification works, it's imo surely not the right fix.

Greets,
Dominik

Other related posts: