From: Jorrit T. <jo...@us...> - 2004-08-09 20:13:45
|
Update of /cvsroot/planeshift/planeshift/src/common/paws In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14581/src/common/paws Modified Files: pawstextbox.cpp Log Message: - Fixed a crash bug in pawsMultiLineTextBox::OrganizeText() in case the text to organize started with a newline. Index: pawstextbox.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/common/paws/pawstextbox.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** pawstextbox.cpp 31 Jul 2004 18:58:12 -0000 1.35 --- pawstextbox.cpp 9 Aug 2004 20:13:36 -0000 1.36 *************** *** 1188,1195 **** canDrawLines = screenFrame.Height() / maxHeight; ! char* dummy = new char[strlen( text ) + 1]; char* head = dummy; ! strcpy( dummy, text ); int offSet = 0; --- 1188,1198 ---- canDrawLines = screenFrame.Height() / maxHeight; ! char* dummy = new char[text.Length() + 1]; char* head = dummy; ! if (text.Length () > 0) ! strcpy( dummy, text ); ! else ! dummy[0] = 0; int offSet = 0; |