From 7b62572a56689cca675c167a2cba3a590733ea2e Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Sun, 6 Mar 2022 22:19:04 -0800 Subject: [PATCH] Handle sanitized protections edge case --- CHANGELIST.md | 1 + MPF.Library/Protection.cs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELIST.md b/CHANGELIST.md index 13c58f4f..5d1e156f 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -21,6 +21,7 @@ - Update to Aaru v5.3.1 LTS - Add upper case `` processing - Reorder event handers +- Handle sanitized protections edge case ### 2.3 (2022-02-05) - Start overhauling Redump information pulling, again diff --git a/MPF.Library/Protection.cs b/MPF.Library/Protection.cs index 0c00b182..d7b79f43 100644 --- a/MPF.Library/Protection.cs +++ b/MPF.Library/Protection.cs @@ -48,6 +48,9 @@ namespace MPF.Library // Sanitize and join protections for writing string protections = SanitizeFoundProtections(orderedDistinctProtections); + if (string.IsNullOrWhiteSpace(protections)) + return (true, "None found"); + return (true, protections); } catch (Exception ex)