From f1bfc3514dd2809bfed60849652f4918d3936e31 Mon Sep 17 00:00:00 2001
From: Christoph Oelckers <coelckers@users.noreply.github.com>
Date: Wed, 14 Mar 2018 19:52:30 +0100
Subject: [PATCH] - fixed: For proper recognition of optional function
 arguments, the argflags must also be copied from the parent function to
 ensure they are itdentical on the override.

---
 src/scripting/zscript/zcc_compile.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp
index 279d9adda..4d530c8a5 100644
--- a/src/scripting/zscript/zcc_compile.cpp
+++ b/src/scripting/zscript/zcc_compile.cpp
@@ -2743,6 +2743,7 @@ void ZCCCompiler::CompileFunction(ZCC_StructWork *c, ZCC_FuncDeclarator *f, bool
 						if (parentfunc->Variants[0].Implementation->DefaultArgs.Size() > 0)
 						{
 							sym->Variants[0].Implementation->DefaultArgs = parentfunc->Variants[0].Implementation->DefaultArgs;
+							sym->Variants[0].ArgFlags = parentfunc->Variants[0].ArgFlags;
 						}
 					}
 				}