mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 11:12:37 +00:00
Fix Unicode support in lobby.
Fix EncryptPassword being called with the wrong argument order, and encrypting username instead of password. (This will break all existing lobby accounts.) Fix EncryptPassword not using all of salt_base. This was SVN commit r14123.
This commit is contained in:
@@ -189,6 +189,13 @@ public:
|
||||
template<typename T>
|
||||
bool SetProperty(jsval obj, const char* name, const T& value, bool constant = false, bool enumerate = true);
|
||||
|
||||
/**
|
||||
* Set the named property on the given object.
|
||||
* Optionally makes it {ReadOnly, DontDelete, DontEnum}.
|
||||
*/
|
||||
template<typename T>
|
||||
bool SetProperty(jsval obj, const wchar_t* name, const T& value, bool constant = false, bool enumerate = true);
|
||||
|
||||
/**
|
||||
* Set the integer-named property on the given object.
|
||||
* Optionally makes it {ReadOnly, DontDelete, DontEnum}.
|
||||
@@ -327,6 +334,7 @@ private:
|
||||
bool Eval_(const wchar_t* code, jsval& ret);
|
||||
bool SetGlobal_(const char* name, jsval value, bool replace);
|
||||
bool SetProperty_(jsval obj, const char* name, jsval value, bool readonly, bool enumerate);
|
||||
bool SetProperty_(jsval obj, const wchar_t* name, jsval value, bool readonly, bool enumerate);
|
||||
bool SetPropertyInt_(jsval obj, int name, jsval value, bool readonly, bool enumerate);
|
||||
bool GetProperty_(jsval obj, const char* name, jsval& value);
|
||||
bool GetPropertyInt_(jsval obj, int name, jsval& value);
|
||||
@@ -464,6 +472,12 @@ bool ScriptInterface::SetProperty(jsval obj, const char* name, const T& value, b
|
||||
return SetProperty_(obj, name, ToJSVal(GetContext(), value), readonly, enumerate);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool ScriptInterface::SetProperty(jsval obj, const wchar_t* name, const T& value, bool readonly, bool enumerate)
|
||||
{
|
||||
return SetProperty_(obj, name, ToJSVal(GetContext(), value), readonly, enumerate);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool ScriptInterface::SetPropertyInt(jsval obj, int name, const T& value, bool readonly, bool enumerate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user