diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e32f1b4..b01a4aa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -6824,16 +6824,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6824 | public LSL_String llBase64ToString(string str) | 6824 | public LSL_String llBase64ToString(string str) |
6825 | { | 6825 | { |
6826 | m_host.AddScriptLPS(1); | 6826 | m_host.AddScriptLPS(1); |
6827 | UTF8Encoding encoder = new UTF8Encoding(); | ||
6828 | Decoder utf8Decode = encoder.GetDecoder(); | ||
6829 | try | 6827 | try |
6830 | { | 6828 | { |
6831 | byte[] todecode_byte = Convert.FromBase64String(str); | 6829 | return Util.Base64ToString(str); |
6832 | int charCount = utf8Decode.GetCharCount(todecode_byte, 0, todecode_byte.Length); | ||
6833 | char[] decoded_char = new char[charCount]; | ||
6834 | utf8Decode.GetChars(todecode_byte, 0, todecode_byte.Length, decoded_char, 0); | ||
6835 | string result = new String(decoded_char); | ||
6836 | return result; | ||
6837 | } | 6830 | } |
6838 | catch (Exception e) | 6831 | catch (Exception e) |
6839 | { | 6832 | { |
@@ -6841,6 +6834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6841 | } | 6834 | } |
6842 | } | 6835 | } |
6843 | 6836 | ||
6837 | |||
6844 | public LSL_String llXorBase64Strings(string str1, string str2) | 6838 | public LSL_String llXorBase64Strings(string str1, string str2) |
6845 | { | 6839 | { |
6846 | m_host.AddScriptLPS(1); | 6840 | m_host.AddScriptLPS(1); |