forked from OctaForge/libcubescript
fixes
parent
6b17c4594f
commit
73d1b142d1
|
@ -1066,8 +1066,8 @@ static void compile_cmd(
|
||||||
case '3':
|
case '3':
|
||||||
case '4':
|
case '4':
|
||||||
if (more && (numargs < MaxArguments)) {
|
if (more && (numargs < MaxArguments)) {
|
||||||
int numrep = *fmt - '0' + 1;
|
int numrep = -int(*fmt) + '0' - 1;
|
||||||
fmt -= numrep;
|
fmt = ostd::string_range{&fmt[numrep], &fmt[fmt.size()]};
|
||||||
rep = true;
|
rep = true;
|
||||||
} else {
|
} else {
|
||||||
while (numargs > MaxArguments) {
|
while (numargs > MaxArguments) {
|
||||||
|
|
|
@ -75,7 +75,7 @@ cs_int cs_parse_int(ostd::string_range input, ostd::string_range *end) {
|
||||||
++past;
|
++past;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
if (past.equals_front(input)) {
|
if (&past[0] == &input[0]) {
|
||||||
p_set_end(orig, end);
|
p_set_end(orig, end);
|
||||||
} else {
|
} else {
|
||||||
p_set_end(past, end);
|
p_set_end(past, end);
|
||||||
|
|
|
@ -451,7 +451,9 @@ static inline void callcommand(
|
||||||
case '3':
|
case '3':
|
||||||
case '4':
|
case '4':
|
||||||
if (i + 1 < numargs) {
|
if (i + 1 < numargs) {
|
||||||
fmt -= *fmt - '0' + 1;
|
fmt = ostd::string_range{
|
||||||
|
&fmt[-int(*fmt) + '0' - 1], &fmt[fmt.size()]
|
||||||
|
};
|
||||||
rep = true;
|
rep = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue