fix null reference bug and handle escaped escape characters in string tokenization

This commit is contained in:
Eliot Jones
2019-05-11 15:35:56 +01:00
parent 72ef0f174a
commit 5b5a0b7f55
4 changed files with 44 additions and 1 deletions

View File

@@ -98,7 +98,7 @@
}
Encoding fromFont = null;
font.Match(x => fromFont = x.Encoding != null ? new BuiltInEncoding(x.Encoding) : default(Encoding), x =>
font?.Match(x => fromFont = x.Encoding != null ? new BuiltInEncoding(x.Encoding) : default(Encoding), x =>
{
if (x.Fonts != null && x.Fonts.Count > 0)
{

View File

@@ -109,6 +109,7 @@
if (isEscapeActive)
{
builder.Append(c);
isEscapeActive = false;
}
else
{