From: Laszlo T. <ave...@us...> - 2004-11-16 20:55:35
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31516/GUIScript Modified Files: GUIScript.cpp Log Message: fixed setmapnote (need to duplicate string before assigning it to mapnote) Index: GUIScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp,v retrieving revision 1.241 retrieving revision 1.242 diff -C2 -d -r1.241 -r1.242 *** GUIScript.cpp 15 Nov 2004 21:54:39 -0000 1.241 --- GUIScript.cpp 16 Nov 2004 20:55:20 -0000 1.242 *************** *** 3975,3979 **** point.y=y; if(txt && txt[0]) { ! map->AddMapNote(point, color, txt); } else { --- 3975,3981 ---- point.y=y; if(txt && txt[0]) { ! char* newvalue = ( char* ) malloc( strlen( txt ) + 1 ); //duplicating the string ! strcpy( newvalue, txt ); ! map->AddMapNote(point, color, newvalue); } else { |