mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-11 00:16:56 +00:00
Linux Compat and some updated PARANOIA code
This was SVN commit r1189.
This commit is contained in:
@@ -322,7 +322,9 @@ CStrW ScriptingHost::ValueToUCString( const jsval value )
|
||||
if (string == NULL)
|
||||
throw PSERROR_Scripting_ConversionFailed();
|
||||
|
||||
return CStrW(JS_GetStringChars(string), JS_GetStringLength(string));
|
||||
jschar *strptr=JS_GetStringChars(string);
|
||||
uint length=JS_GetStringLength(string);
|
||||
return CStrW(std::wstring(strptr, strptr+length));
|
||||
}
|
||||
|
||||
jsval ScriptingHost::UCStringToValue(const utf16string &str)
|
||||
|
||||
Reference in New Issue
Block a user