Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null ref exception in LookupType5Format2SubTable #365

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

JimBobSquarePants
Copy link
Member

@JimBobSquarePants JimBobSquarePants commented Nov 30, 2023

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following matches the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

Fixes #364 cc @IshmaZX82

image

@@ -52,9 +52,9 @@ public IndicShaper(ScriptClass script, Tag unicodeScriptTag, TextOptions textOpt
{
this.textOptions = textOptions;

if (IndicConfigurations.ContainsKey(script))
if (IndicConfigurations.TryGetValue(script, out ShapingConfiguration value))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET 7 CI now throws for ContainsKey

@@ -528,12 +528,13 @@ or 0x2068

if (category != null)
{
if (!symbols.ContainsKey(category))
if (!symbols.TryGetValue(category, out int value))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.NET 7 CI now throws for ContainsKey

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (e5a0f4a) 86% compared to head (3ef36ae) 86%.

Files Patch % Lines
.../Tables/AdvancedTypographic/Shapers/IndicShaper.cs 50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #365   +/-   ##
=====================================
  Coverage     86%     86%           
=====================================
  Files        238     238           
  Lines      15182   15184    +2     
  Branches    2100    2101    +1     
=====================================
+ Hits       13085   13088    +3     
  Misses      1613    1613           
+ Partials     484     483    -1     
Flag Coverage Δ
unittests 86% <80%> (+<1%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JimBobSquarePants JimBobSquarePants merged commit 5f65774 into main Nov 30, 2023
8 checks passed
@JimBobSquarePants JimBobSquarePants deleted the js/fix-363 branch November 30, 2023 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with font "BNazanin.ttf", System.NullReferenceException
2 participants