If statements would not skip to the end of the if-elif-else structure if they were true and didn't have an exit() inside of them.
For example with the following code
let x = 1;
if (x) {
//exit(1);
}
elif (x + 1) {
exit(2);
}
elif (x + 2) {
exit(3);
}
else {
exit(13);
}
exit(14);
You would expect the result to be 14 but instead we get 2 because after the if statement executes it jumps to the next elif statement instead of to the end of the structure.
This pull request just modifies two lines of code to fix that issue.
If statements would not skip to the end of the if-elif-else structure if they were true and didn't have an
exit()
inside of them.For example with the following code
You would expect the result to be 14 but instead we get 2 because after the if statement executes it jumps to the next elif statement instead of to the end of the structure.
This pull request just modifies two lines of code to fix that issue.