Project

General

Profile

Actions

Bug #334

closed

Bug #80: Version 1.6 bugfixes

Variable-size arrays may contain size in name

Added by Ole Hansen over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
03/13/2018
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:
Responsible:

Description

When using the VarDef API in THaAnalysisObject,

Int_t DefineVarsFromList( const VarDef* list, EMode mode = kDefine, const char* var_prefix="" ) const;

and setting both VarDef::size > 1, indicating a fixed-size array, and VarDef::count != 0, indicating a variable size array, an ill-formed global variable with array syntax in its name, e.g. a[10], is created. THaVarList::Find then fails to find such variables.

Reported by Juan Carlos Cornejo. Copied from GitHub issue no. 153.

Actions #1

Updated by Ole Hansen over 4 years ago

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

Added checks for conflicting VarDef specs in THaVarList::DefineVariables. If both fixed-size and variable-size arrays seem to be specified, print a warning and assume a variable-size array (since giving a size may be an accident, but specifying a size counter most likely isn't).

Closed with commit d52843a

Actions

Also available in: Atom PDF