mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 17:32:42 +08:00
Mantis #2232
Thank you, idb, for a patch that fixes an overflow issue in casting string -> int for both engines, and adds tests!
This commit is contained in:
@@ -62,6 +62,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests
|
||||
m_stringIntSet.Add("123.9", 123);
|
||||
m_stringIntSet.Add("999999999", 999999999);
|
||||
m_stringIntSet.Add("-99999999", -99999999);
|
||||
m_stringIntSet.Add("", 0);
|
||||
m_stringIntSet.Add("aa", 0);
|
||||
m_stringIntSet.Add("42", 42);
|
||||
m_stringIntSet.Add("42 is the answer", 42);
|
||||
m_stringIntSet.Add(" 42", 42);
|
||||
m_stringIntSet.Add("42,123,456", 42);
|
||||
m_stringIntSet.Add("0xff", 255);
|
||||
m_stringIntSet.Add("12345678900000", -1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user