You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on my Small Visual Basic, I discovered a bug in the Microsoft.SmallBasic.Library.Primitive class.
When I call Primitive.IsArray on a variable that has a numeric value, it reserts its value to null. Tracing this bug, I found that IsArray calls ConstructArrayMap(), which initializes the _arrayMap: _arrayMap = new Dictionary<Primitive, Primitive>(PrimitiveComparer.Instance);
before calling AsString char[] source = AsString.ToCharArray();
Un the AsString if _arrayMap is not null, the primative value is set to the string representaion of the array which is null:
if (_arrayMap != null)
{
StringBuilder stringBuilder = new StringBuilder();
foreach (KeyValuePair<Primitive, Primitive> item in _arrayMap)
{
stringBuilder.AppendFormat("{0}={1};", Escape(item.Key), Escape(item.Value));
}
_primitive = stringBuilder.ToString();
}
The text was updated successfully, but these errors were encountered:
While working on my Small Visual Basic, I discovered a bug in the
Microsoft.SmallBasic.Library.Primitive
class.When I call Primitive.IsArray on a variable that has a numeric value, it reserts its value to null. Tracing this bug, I found that IsArray calls
ConstructArrayMap()
, which initializes the _arrayMap:_arrayMap = new Dictionary<Primitive, Primitive>(PrimitiveComparer.Instance);
before calling
AsString
char[] source = AsString.ToCharArray();
Un the
AsString
if_arrayMap
is not null, the primative value is set to the string representaion of the array which is null:The text was updated successfully, but these errors were encountered: