Skip to content

Commit

Permalink
Specify culture for Convert.ToInt32
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Feb 25, 2024
1 parent 12ef921 commit 956c280
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Lucene.Net.Tests/Search/TestQueryRescorer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using RandomizedTesting.Generators;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Assert = Lucene.Net.TestFramework.Assert;

Expand Down Expand Up @@ -373,8 +374,8 @@ public virtual void TestRandom()
{
try
{
int av = idToNum[Convert.ToInt32(r.Document(a).Get("id"))];
int bv = idToNum[Convert.ToInt32(r.Document(b).Get("id"))];
int av = idToNum[Convert.ToInt32(r.Document(a).Get("id"), CultureInfo.InvariantCulture)];
int bv = idToNum[Convert.ToInt32(r.Document(b).Get("id"), CultureInfo.InvariantCulture)];
if (av < bv)
{
return -reverseInt;
Expand Down

0 comments on commit 956c280

Please sign in to comment.