Bug #8516

DEFAULT_PARAM() doesn't handle undefined parameters list

Added by alef over 5 years ago. Updated about 5 years ago.

Status:Closed Start date:01/25/2010
Priority:Normal Due date:
Assignee:killswitch % Done:

100%

Category:Macros
Target version:v0.3.1
Component: Affected Version:
Close Reason:

Description

If a parameter is missing, a default value can be assigned.
But if the list itself is missing, an error will happen.
Changing the macro to
1 #define DEFAULT_PARAM(INDEX,name,DEF_VALUE) \ 2 private #NAME; \ 3 name = [RETNIL(_this), INDEX, DEF_VALUE] call CBA_fnc_defaultParam; \ 4 TRACE_3("DEFAULT_PARAM",INDEX,name,DEF_VALUE)
will help solving the issue.

Empty parameters list [] is already handed by fnc_defaultParam. RETNIL is defined in #8514.

Associated revisions

Revision 2277a0b3
Added by killswitch over 5 years ago

FIXED: DEFAULT_PARAM could not handle a undefined '_this' parameter input. Fixes #8516

Revision 2277a0b3
Added by killswitch over 5 years ago

FIXED: DEFAULT_PARAM could not handle a undefined '_this' parameter input. Fixes #8516

History

Updated by killswitch over 5 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Updated by killswitch over 5 years ago

  • Assignee set to killswitch
  • Target version set to v0.3.x

Updated by Sickboy about 5 years ago

  • Status changed from Resolved to Closed

Updated by Sickboy about 5 years ago

  • Target version changed from v0.3.x to v0.3.1

Also available in: Atom PDF