Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
ziqian zhang
Grasscutter
Commits
15dca5a0
Commit
15dca5a0
authored
May 05, 2022
by
Luke H-W
Committed by
GitHub
May 05, 2022
Browse files
GiveCommand: fix edge case with unspaced multiple args (#539)
Co-authored-by:
AnimeGitB
<
AnimeGitB@bigblueball.in
>
parent
e693612e
Changes
1
Show whitespace changes
Inline
Side-by-side
src/main/java/emu/grasscutter/command/commands/GiveCommand.java
View file @
15dca5a0
...
...
@@ -20,7 +20,7 @@ import java.util.regex.Matcher;
public
final
class
GiveCommand
implements
CommandHandler
{
Pattern
lvlRegex
=
Pattern
.
compile
(
"l(?:vl?)?(\\d+)"
);
// Java is a joke of a proglang that doesn't have raw string literals
Pattern
refineRegex
=
Pattern
.
compile
(
"r(\\d+)"
);
Pattern
amountRegex
=
Pattern
.
compile
(
"((?<=x)\\d+|\\d+(?=x))"
);
Pattern
amountRegex
=
Pattern
.
compile
(
"((?<=x)\\d+|\\d+(?=x)
(?!x\\d)
)"
);
private
int
matchIntOrNeg
(
Pattern
pattern
,
String
arg
)
{
Matcher
match
=
pattern
.
matcher
(
arg
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment