Skip to content

Commit

Permalink
fix: StringUtil出现错误,以致无法在插件侧加载,修正
Browse files Browse the repository at this point in the history
  • Loading branch information
0XPYEX0 committed Aug 31, 2024
1 parent 2c593bc commit 17f279c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package me.xpyex.module.cnusername.mojang;

import java.util.regex.Pattern;
import me.xpyex.module.cnusername.Logging;
import me.xpyex.module.cnusername.impl.PatternVisitor;
import org.objectweb.asm.ClassVisitor;
Expand Down Expand Up @@ -35,6 +36,7 @@ public MethodVisitor visitMethod(int access, String name, String descriptor, Str

// Label1
visitor.visitLabel(label1);
visitor.visitFrame(Opcodes.F_SAME, 0, null, 0, null);
visitor.visitLdcInsn(getPattern());
visitor.visitMethodInsn(Opcodes.INVOKESTATIC, "java/util/regex/Pattern", "compile", "(Ljava/lang/String;)Ljava/util/regex/Pattern;", false);
visitor.visitVarInsn(Opcodes.ALOAD, 0);
Expand All @@ -45,7 +47,7 @@ public MethodVisitor visitMethod(int access, String name, String descriptor, Str
// Label2
Label label2 = new Label();
visitor.visitLabel(label2);
visitor.visitLocalVariable("name", "Ljava/lang/String;", null, label1, label2, 0);
visitor.visitLocalVariable("name", "Ljava/lang/String;", null, label0, label2, 0);
visitor.visitMaxs(0, 0);
visitor.visitEnd();
return null;
Expand Down

0 comments on commit 17f279c

Please sign in to comment.