diff options
author | Freaky Tech | 2015-03-04 18:36:14 +0100 |
---|---|---|
committer | BlueWall | 2015-03-04 12:41:49 -0500 |
commit | eacdad8405c7af612d6c8fd6b5b4b5847a66169c (patch) | |
tree | aefe9b308fdb912898573f8e73110065da7c68dc | |
parent | usability fixes for LightShare API (diff) | |
download | opensim-SC_OLD-eacdad8405c7af612d6c8fd6b5b4b5847a66169c.zip opensim-SC_OLD-eacdad8405c7af612d6c8fd6b5b4b5847a66169c.tar.gz opensim-SC_OLD-eacdad8405c7af612d6c8fd6b5b4b5847a66169c.tar.bz2 opensim-SC_OLD-eacdad8405c7af612d6c8fd6b5b4b5847a66169c.tar.xz |
simplify llStringToBase64 and llBase64ToString
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 6a30da2..31ae64f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -8228,7 +8228,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8228 | m_host.AddScriptLPS(1); | 8228 | m_host.AddScriptLPS(1); |
8229 | try | 8229 | try |
8230 | { | 8230 | { |
8231 | byte[] encData_byte = new byte[str.Length]; | 8231 | byte[] encData_byte; |
8232 | encData_byte = Util.UTF8.GetBytes(str); | 8232 | encData_byte = Util.UTF8.GetBytes(str); |
8233 | string encodedData = Convert.ToBase64String(encData_byte); | 8233 | string encodedData = Convert.ToBase64String(encData_byte); |
8234 | return encodedData; | 8234 | return encodedData; |
@@ -8245,7 +8245,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8245 | m_host.AddScriptLPS(1); | 8245 | m_host.AddScriptLPS(1); |
8246 | try | 8246 | try |
8247 | { | 8247 | { |
8248 | return Util.Base64ToString(str); | 8248 | byte[] b = Convert.FromBase64String(str); |
8249 | return Encoding.UTF8.GetString(b); | ||
8249 | } | 8250 | } |
8250 | catch | 8251 | catch |
8251 | { | 8252 | { |