From 21b07705ce1b9683039613a91719508616237525 Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Wed, 1 Nov 2023 01:52:21 +0800 Subject: [PATCH] Return empty list for state indices when having parsed an empty string --- src/EFCore.Jet.Data/JetCommandParser.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/EFCore.Jet.Data/JetCommandParser.cs b/src/EFCore.Jet.Data/JetCommandParser.cs index d0b02b5..72d0914 100644 --- a/src/EFCore.Jet.Data/JetCommandParser.cs +++ b/src/EFCore.Jet.Data/JetCommandParser.cs @@ -18,10 +18,11 @@ namespace EntityFrameworkCore.Jet.Data } public IReadOnlyList GetStateIndices(char state, int start = 0, int length = -1) - => GetStateIndices(new[] {state}, start, length); + => GetStateIndices(new[] { state }, start, length); public IReadOnlyList GetStateIndices(char[] states, int start = 0, int length = -1) { + if (States.Length == 0) return new List(); if (states == null) { throw new ArgumentNullException(nameof(states));