From 00800c59d35662d65aeb61a17de0d56fa6196509 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 12 Feb 2010 23:13:35 +0000 Subject: Apply last two patches from http://opensimulator.org/mantis/view.php?id=3522 These patch should allow people using systems that do not have their locale set to En_US or similar to use OpenSim without suffering effects such as being a million miles up in the air on login. The problem was caused by parsing strings without forcing that parse to be En_US (hence different decimal and digit group symbols were causing problems). Thanks very much to VikingErik for doing the legwork on this fix and phacelia for spotting it in the first place. --- OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs | 2 +- OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs index 9fe669a..4004135 100644 --- a/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs +++ b/OpenSim/Region/CoreModules/Framework/InterfaceCommander/Command.cs @@ -147,7 +147,7 @@ namespace OpenSim.Region.CoreModules.Framework.InterfaceCommander m_args[i].ArgumentValue = Int32.Parse(arg.ToString()); break; case "Double": - m_args[i].ArgumentValue = Double.Parse(arg.ToString()); + m_args[i].ArgumentValue = Double.Parse(arg.ToString(), OpenSim.Framework.Culture.NumberFormatInfo); break; case "Boolean": m_args[i].ArgumentValue = Boolean.Parse(arg.ToString()); diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 695cced..03da269 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs @@ -974,8 +974,8 @@ namespace OpenSim.Region.CoreModules.World.Estate if (y == -1 || m_scene.RegionInfo.RegionLocY == y) { int corner = int.Parse(num); - float lowValue = float.Parse(min); - float highValue = float.Parse(max); + float lowValue = float.Parse(min, Culture.NumberFormatInfo); + float highValue = float.Parse(max, Culture.NumberFormatInfo); m_log.Debug("[ESTATEMODULE] Setting terrain heights " + m_scene.RegionInfo.RegionName + string.Format(" (C{0}, {1}-{2}", corner, lowValue, highValue)); -- cgit v1.1