mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-13 23:16:12 +00:00
Combat code, some scripting, broken network, and fixed some bugs.
This was SVN commit r1301.
This commit is contained in:
@@ -33,6 +33,8 @@ JSString* StringConvert::wstring_to_jsstring(JSContext* cx, const std::wstring&
|
||||
JSString* StringConvert::wchars_to_jsstring(JSContext* cx, const wchar_t* chars)
|
||||
{
|
||||
size_t len = wcslen(chars);
|
||||
if( !len )
|
||||
return( JSVAL_TO_STRING( JS_GetEmptyStringValue( cx ) ) );
|
||||
jschar* data = (jschar*)JS_malloc(cx, len*sizeof(jschar));
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user