Skip to content

Commit

Permalink
Action type 12 answer use case insensitive compare
Browse files Browse the repository at this point in the history
Rather than convert to lowercase with invariant culture, perform a case-insensitive string comparison.
  • Loading branch information
Interkarma committed Oct 7, 2023
1 parent e3a94e1 commit a413a03
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Assets/Scripts/Internal/DaggerfallAction.cs
Expand Up @@ -441,10 +441,9 @@ public void UserInputHandler(DaggerfallInputMessageBox sender, string userInput)
DaggerfallUnity.LogMessage(string.Format(("No answers to check for: {0} {1}"), this.gameObject.name, this.Index));
return;
}
userInput = userInput.ToLower(System.Globalization.CultureInfo.InvariantCulture);
for (int i = 0; i < type12_answers.Length; i++)
{
if (userInput == type12_answers[i].ToLower())
if (string.Compare(userInput, type12_answers[i], true) == 0)
{
ActivateNext();
return;
Expand Down

0 comments on commit a413a03

Please sign in to comment.