Skip to content

Commit c3cdf00

Browse files
committed
fix: max number of conditions and indicators
1 parent 92b72fd commit c3cdf00

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ui/dspf.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ export class Conditional {
573573

574574
push(indicatorStr: string) {
575575
if (indicatorStr.substring(0, 1) === `O` && this.conditions[this.conditions.length - 1].indicators.length > 0) {
576-
if (this.conditions.length >= 8) {
576+
if (this.conditions.length >= 9) {
577577
throw new Error("Too many conditions");
578578
}
579579
this.conditions.push({indicators: []});
@@ -591,7 +591,7 @@ export class Conditional {
591591
negate = (indicatorStr.substring(cIndex, cIndex + 1) === "N");
592592
indicator = Number(indicatorStr.substring(cIndex + 1, cIndex + 3));
593593
if (indicator !== 0) {
594-
if (this.conditions[this.conditions.length - 1].indicators.length >= 8) {
594+
if (this.conditions[this.conditions.length - 1].indicators.length >= 9) {
595595
throw new Error("Too many option indicators specified for one condition");
596596
}
597597
this.conditions[this.conditions.length - 1].indicators.push({

0 commit comments

Comments
 (0)