From d4d76487ba7d984cad888220e87f80a18a0b8017 Mon Sep 17 00:00:00 2001 From: Jos Date: Wed, 27 Apr 2022 16:51:25 +0200 Subject: [PATCH] Added count for storage items --- NewWorldCompanion.Services/OcrHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewWorldCompanion.Services/OcrHandler.cs b/NewWorldCompanion.Services/OcrHandler.cs index 9781843..8acc922 100644 --- a/NewWorldCompanion.Services/OcrHandler.cs +++ b/NewWorldCompanion.Services/OcrHandler.cs @@ -75,7 +75,7 @@ private void HandleOcrImageReadyEvent() string ocrText = tesseract.Read(image).Trim().Replace('\n', ' '); var mapping = _ocrMappings.FirstOrDefault(m => m.key.Equals(ocrText), new OcrMapping { key = ocrText, value = ocrText }); OcrText = mapping.value; - OcrText = _newWorldDataStore.GetLevenshteinItemName(OcrText); + OcrText = string.IsNullOrWhiteSpace(OcrText) ? string.Empty : _newWorldDataStore.GetLevenshteinItemName(OcrText); image.Dispose(); tesseract.Dispose();