Commit e4b2623 1 parent 386e273 commit e4b2623 Copy full SHA for e4b2623
File tree 1 file changed +4
-2
lines changed
src/main/java/dev/qixils/quasicord/converter/impl
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -94,8 +94,10 @@ public ZonedDateTimeConverter(@NonNull Quasicord library) {
94
94
// get time
95
95
Matcher timeMatcher = TIME_PATTERN .matcher (input );
96
96
if (timeMatcher .find ()) {
97
- hour = Integer .parseInt (timeMatcher .group ("hour" ));
98
- minute = Integer .parseInt (timeMatcher .group ("minute" ));
97
+ if (timeMatcher .group ("hour" ) != null )
98
+ hour = Integer .parseInt (timeMatcher .group ("hour" ));
99
+ if (timeMatcher .group ("minute" ) != null )
100
+ minute = Integer .parseInt (timeMatcher .group ("minute" ));
99
101
if (timeMatcher .group ("second" ) != null )
100
102
second = Integer .parseInt (timeMatcher .group ("second" ));
101
103
if (timeMatcher .group ("nanos" ) != null )
You can’t perform that action at this time.
0 commit comments