forked from mirrors/0ad
Use .assign instead of operator=.
This was SVN commit r17634.
This commit is contained in:
@@ -177,7 +177,7 @@ template<> bool ScriptInterface::FromJSVal<std::string>(JSContext* cx, JS::Handl
|
||||
char* ch = JS_EncodeString(cx, str); // chops off high byte of each char16_t
|
||||
if (!ch)
|
||||
FAIL("JS_EncodeString failed"); // out of memory
|
||||
out = std::string(ch, ch + JS_GetStringLength(str));
|
||||
out.assign(ch, ch + JS_GetStringLength(str));
|
||||
JS_free(cx, ch);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user