Skip to content

Commit 2d41b43

Browse files
committed
Fix error in core using inc/dec on procedures
Fixes error in core for: ``` proc _a() { return 1; } _a()++; ```
1 parent adfe452 commit 2d41b43

File tree

1 file changed

+1
-1
lines changed
  • src/main/java/com/laytonsmith/core/functions

1 file changed

+1
-1
lines changed

src/main/java/com/laytonsmith/core/functions/Math.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ public Set<OptimizationOption> optimizationOptions() {
524524
protected static Mixed doIncrementDecrement(ParseTree[] nodes,
525525
Script parent, Environment env, Target t,
526526
Function func, boolean pre, boolean inc) {
527-
if(nodes[0].getData() instanceof CFunction) {
527+
if(nodes[0].getData() instanceof CFunction && ((CFunction) nodes[0].getData()).hasFunction()) {
528528
Function f;
529529
try {
530530
f = ((CFunction) nodes[0].getData()).getFunction();

0 commit comments

Comments
 (0)