aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/Danker/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/me/Danker/utils')
-rw-r--r--src/main/java/me/Danker/utils/Utils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java
index b828146..e2dde4b 100644
--- a/src/main/java/me/Danker/utils/Utils.java
+++ b/src/main/java/me/Danker/utils/Utils.java
@@ -578,7 +578,7 @@ public class Utils {
if (!romanNumerals.containsKey(text.charAt(i))) continue;
int roman = romanNumerals.get(text.charAt(i));
- if (i != text.length() - 1 && roman < romanNumerals.get(text.charAt(i + 1))) {
+ if (i != text.length() - 1 && romanNumerals.containsKey(text.charAt(i + 1)) && roman < romanNumerals.get(text.charAt(i + 1))) {
number += romanNumerals.get(text.charAt(i + 1)) - roman;
i++;
} else {