Skip to content

Commit

Permalink
Target English locale when comparing lowercase ActionType representat…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
AntumDeluge committed Dec 2, 2023
1 parent 433bf1e commit f08aa4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/games/stendhal/client/entity/ActionType.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
***************************************************************************/
package games.stendhal.client.entity;

import java.util.Locale;

import games.stendhal.client.StendhalClient;
import games.stendhal.common.constants.Actions;
import marauroa.common.game.Definition.DefinitionClass;
Expand Down Expand Up @@ -220,7 +222,7 @@ private ActionType(final String actCode, final String actionRep) {
*/
public static ActionType getbyRep(final String representation) {
for (final ActionType at : ActionType.values()) {
if (at.actionRepresentation.toLowerCase().equals(representation.toLowerCase())) {
if (at.actionRepresentation.toLowerCase(Locale.ENGLISH).equals(representation.toLowerCase(Locale.ENGLISH))) {
return at;
}

Expand Down

0 comments on commit f08aa4d

Please sign in to comment.