Skip to content

Commit

Permalink
Fix error in core using inc/dec on procedures
Browse files Browse the repository at this point in the history
Fixes error in core for:
```
proc _a() { return 1; } _a()++;
```
  • Loading branch information
Pieter12345 committed Dec 25, 2024
1 parent adfe452 commit 2d41b43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/laytonsmith/core/functions/Math.java
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ public Set<OptimizationOption> optimizationOptions() {
protected static Mixed doIncrementDecrement(ParseTree[] nodes,
Script parent, Environment env, Target t,
Function func, boolean pre, boolean inc) {
if(nodes[0].getData() instanceof CFunction) {
if(nodes[0].getData() instanceof CFunction && ((CFunction) nodes[0].getData()).hasFunction()) {
Function f;
try {
f = ((CFunction) nodes[0].getData()).getFunction();
Expand Down

0 comments on commit 2d41b43

Please sign in to comment.