/////////////////////////////////////////////////////////////////////////////
-// Name: mse/utils.cpp
+// Name: msw/utils.cpp
// Purpose: Various utilities
// Author: Julian Smart
// Modified by:
if ( !theText )
return NULL;
- wxChar *s = copystring(theText);
+ // Not all compilers put a zero at the end of the resource (e.g. BC++ doesn't).
+ // so we need to find the length of the resource.
+ int len = ::SizeofResource(wxGetInstance(), hResource);
+ wxChar *s = new wxChar[len+1];
+ wxStrncpy(s,theText,len);
+ s[len]=0;
+
+ // wxChar *s = copystring(theText);
// Obsolete in WIN32
#ifndef __WIN32__