diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 52 |
2 files changed, 39 insertions, 17 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 5d7f25c..abeed5b 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs | |||
@@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
396 | { | 396 | { |
397 | folder = invService.GetFolder(client.AgentId, inventoryID); | 397 | folder = invService.GetFolder(client.AgentId, inventoryID); |
398 | 398 | ||
399 | if (folder != null & trashFolder != null) | 399 | if (folder != null && trashFolder != null) |
400 | { | 400 | { |
401 | previousParentFolderID = folder.ParentID; | 401 | previousParentFolderID = folder.ParentID; |
402 | folder.ParentID = trashFolder.ID; | 402 | folder.ParentID = trashFolder.ID; |
@@ -405,7 +405,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer | |||
405 | } | 405 | } |
406 | } | 406 | } |
407 | 407 | ||
408 | if ((null == item && null == folder) | null == trashFolder) | 408 | if ((null == item && null == folder) || null == trashFolder) |
409 | { | 409 | { |
410 | string reason = String.Empty; | 410 | string reason = String.Empty; |
411 | 411 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index e9ee937..0331a4c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -84,16 +84,26 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
84 | { | 84 | { |
85 | str = str.Replace('<', ' '); | 85 | str = str.Replace('<', ' '); |
86 | str = str.Replace('>', ' '); | 86 | str = str.Replace('>', ' '); |
87 | string[] tmps = str.Split(new Char[] { ',', '<', '>' }); | 87 | string[] tmps = str.Split(new Char[] {','}); |
88 | if (tmps.Length < 3) | 88 | if (tmps.Length < 3) |
89 | { | 89 | { |
90 | x=y=z=0; | 90 | z = y = x = 0; |
91 | return; | 91 | return; |
92 | } | 92 | } |
93 | bool res; | 93 | if (!Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x)) |
94 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); | 94 | { |
95 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); | 95 | z = y = 0; |
96 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); | 96 | return; |
97 | } | ||
98 | if (!Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y)) | ||
99 | { | ||
100 | z = x = 0; | ||
101 | return; | ||
102 | } | ||
103 | if (!Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z)) | ||
104 | { | ||
105 | y = x = 0; | ||
106 | } | ||
97 | } | 107 | } |
98 | 108 | ||
99 | #endregion | 109 | #endregion |
@@ -364,19 +374,31 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
364 | { | 374 | { |
365 | str = str.Replace('<', ' '); | 375 | str = str.Replace('<', ' '); |
366 | str = str.Replace('>', ' '); | 376 | str = str.Replace('>', ' '); |
367 | string[] tmps = str.Split(new Char[] { ',', '<', '>' }); | 377 | string[] tmps = str.Split(new Char[] {','}); |
368 | if (tmps.Length < 4) | 378 | if (tmps.Length < 4 || |
379 | !Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s)) | ||
369 | { | 380 | { |
370 | x=y=z=s=0; | 381 | z = y = x = 0; |
382 | s = 1; | ||
371 | return; | 383 | return; |
372 | } | 384 | } |
373 | bool res; | 385 | if (!Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x)) |
374 | res = Double.TryParse(tmps[0], NumberStyles.Float, Culture.NumberFormatInfo, out x); | 386 | { |
375 | res = res & Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y); | 387 | z = y = 0; |
376 | res = res & Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z); | 388 | s = 1; |
377 | res = res & Double.TryParse(tmps[3], NumberStyles.Float, Culture.NumberFormatInfo, out s); | 389 | return; |
378 | if (s == 0 && x == 0 && y == 0 && z == 0) | 390 | } |
391 | if (!Double.TryParse(tmps[1], NumberStyles.Float, Culture.NumberFormatInfo, out y)) | ||
392 | { | ||
393 | z = x = 0; | ||
379 | s = 1; | 394 | s = 1; |
395 | return; | ||
396 | } | ||
397 | if (!Double.TryParse(tmps[2], NumberStyles.Float, Culture.NumberFormatInfo, out z)) | ||
398 | { | ||
399 | y = x = 0; | ||
400 | s = 1; | ||
401 | } | ||
380 | } | 402 | } |
381 | 403 | ||
382 | public Quaternion(OMV_Quaternion rot) | 404 | public Quaternion(OMV_Quaternion rot) |