mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-23 06:55:14 +00:00
misc. string fixes
convert remaining %s to %hs or %ls use WPRINTF_ARGS on unicode printf functions fix: __func__ can't be widened via preprocessor (-> revert to char*) convert remaining external_[directory|file_string to string() Util: don't mix fwprintf and fprintf Formation: fix dangling pointer (storing result of c_str()) This was SVN commit r7164.
This commit is contained in:
@@ -587,7 +587,7 @@ JSBool JSI_IGUIObject::toString(JSContext* cx, JSObject* obj, uintN UNUSED(argc)
|
||||
IGUIObject* e = (IGUIObject*)JS_GetPrivate( cx, obj );
|
||||
|
||||
char buffer[256];
|
||||
snprintf(buffer, 256, "[GUIObject: %s]", e->GetName().c_str());
|
||||
snprintf(buffer, 256, "[GUIObject: %hs]", e->GetName().c_str());
|
||||
buffer[255] = 0;
|
||||
*rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, buffer));
|
||||
return JS_TRUE;
|
||||
|
||||
Reference in New Issue
Block a user