mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-08-10 17:55:44 +00:00
Merge pull request #3024 from legendarydoge30/hhh
variable substitution for the split function in the AUTOCAL
This commit is contained in:
commit
c052fa7be1
@ -35,7 +35,8 @@ public class ParseMSES1Ext1 extends ParseMSES1 {
|
|||||||
if(lower.startsWith("split ")) {
|
if(lower.startsWith("split ")) {
|
||||||
if(line.length() <= 6) return EnumStatementReturn.PARAMETER_ERROR;
|
if(line.length() <= 6) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
try {
|
try {
|
||||||
int index = Integer.parseInt(line.substring(6));
|
String statement = substitute(ctx, line.substring(6), true);
|
||||||
|
int index = Integer.parseInt(statement);
|
||||||
if(index < 1) return EnumStatementReturn.PARAMETER_ERROR;
|
if(index < 1) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
String[] frags = ctx.readBuffer().split(Pattern.quote(ctx.splitString));
|
String[] frags = ctx.readBuffer().split(Pattern.quote(ctx.splitString));
|
||||||
if(index > frags.length) return EnumStatementReturn.PARAMETER_ERROR;
|
if(index > frags.length) return EnumStatementReturn.PARAMETER_ERROR;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user