Skip to content

Commit

Permalink
Fix param link script functions argument check
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Magnier committed Sep 5, 2024
1 parent de1d0da commit 9f88687
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Source/Common/ParameterLink/ParameterLink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ void ParamLinkContainer::linkParamToMappingIndex(Parameter* p, int mappingIndex)

var ParamLinkContainer::linkParamToMappingIndexFromScript(const var::NativeFunctionArgs& a)
{
if (!checkNumArgs("linkToMappingIndex", a, 2)) return false;
if (!checkNumArgs("linkParamToMappingIndex", a, 2)) return false;

if (ParameterLink* link = getLinkedParamFromScript(a))
{
Expand All @@ -609,7 +609,7 @@ var ParamLinkContainer::linkParamToMappingIndexFromScript(const var::NativeFunct

var ParamLinkContainer::setParamLinkFromScript(const var::NativeFunctionArgs& a)
{
if (!checkNumArgs("setLink", a, 2)) return false;
if (!checkNumArgs("setParamLink", a, 2)) return false;
if (ParameterLink* link = getLinkedParamFromScript(a))
{
link->setLinkFromScript(a.arguments[1]);
Expand All @@ -620,7 +620,7 @@ var ParamLinkContainer::setParamLinkFromScript(const var::NativeFunctionArgs& a)

var ParamLinkContainer::unlinkParamFromScript(const var::NativeFunctionArgs& a)
{
if (!checkNumArgs("setLink", a, 2)) return false;
if (!checkNumArgs("unlinkParam", a, 1)) return false;
if (ParameterLink* link = getLinkedParamFromScript(a))
{
link->setLinkType(ParameterLink::NONE);
Expand Down

0 comments on commit 9f88687

Please sign in to comment.