Skip to content

Commit 20f7e0a

Browse files
Update src/NHibernate/Engine/Query/ParameterParser.cs
Co-authored-by: Frédéric Delaporte <[email protected]>
1 parent 93e12ab commit 20f7e0a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/NHibernate/Engine/Query/ParameterParser.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ public static void Parse(string sqlString, IRecognizer recognizer)
5555
// check comments, unless in quote or at end of string
5656
if (!inQuote && indx + 1 < stringLength)
5757
{
58-
if (indx + 1 < stringLength && sqlString.Substring(indx, 2) == "/*")
58+
var candidateOpenCommentToken = sqlString.Substring(indx, 2);
59+
if (candidateOpenCommentToken == "/*")
5960
{
6061
var closeCommentIdx = sqlString.IndexOf("*/", indx + 2, StringComparison.Ordinal);
6162
recognizer.Other(sqlString.Substring(indx, (closeCommentIdx - indx) + 2));

0 commit comments

Comments
 (0)