Skip to content

OverflowException: Value was either too large or too small for an unsigned byte. #211

@bogatykh

Description

@bogatykh

SmartFormat 2.7.0

Framework: .NET Core 3.1

Steps to reproduce:

`

        string template = "Value: **{VĀLUĒ}**";

        Dictionary<string, object> a = new Dictionary<string, object>();

        var smartFormatter = Smart.CreateDefaultSmartFormat();

        var res = smartFormatter.Format(template, a);

`

Exception:
at System.Convert.ThrowByteOverflowException()
at SmartFormat.Core.Parsing.Parser.ParseFormat(String format, String[] formatterExtensionNames)
at SmartFormat.SmartFormatter.Format(IFormatProvider provider, String format, Object[] args)
at SmartFormat.SmartFormatter.Format(String format, Object[] args)

Code above works in 2.6.2 version of SmartFormat reporting "Invalid character in the selector, Invalid character in the selector".

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions