forked from mirrors/0ad
Revamped CNetClient/CNetServer JS Interface and new CGameAttributes
implementation (moving towards a merger of CGameAttribs into CGame). This was SVN commit r1746.
This commit is contained in:
@@ -64,8 +64,7 @@ jsval SColour::ToString( JSContext* cx, uintN argc, jsval* argv )
|
||||
buffer[255] = 0;
|
||||
|
||||
utf16string str16(buffer, buffer+wcslen(buffer));
|
||||
|
||||
return( STRING_TO_JSVAL( JS_NewUCStringCopyZ( cx, buffer ) ) );
|
||||
return( STRING_TO_JSVAL( JS_NewUCStringCopyZ( cx, str16.c_str() ) ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -85,4 +84,4 @@ JSBool SColour::Construct( JSContext* cx, JSObject* obj, unsigned int argc, jsva
|
||||
*rval = OBJECT_TO_JSVAL( col->GetScript() );
|
||||
|
||||
return( JS_TRUE );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user