File tree 4 files changed +9
-4
lines changed
4 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -137,8 +137,8 @@ tokens {
137
137
PARAEXPR_VN; // _VN Variable Number of parameters version
138
138
DEC_REF_CHECK; // called from EvalRefCheck() (no temporary needed then )
139
139
INC_REF_CHECK; // called from EvalRefCheck() (no temporary needed then )
140
- POSTDEC;
141
- POSTINC;
140
+ POSTDEC; // post - decrement : i --
141
+ POSTINC; // Post - increment : i ++
142
142
DECSTATEMENT; // as a statement
143
143
INCSTATEMENT; // as a statement
144
144
REF; // expr pass by reference
@@ -156,7 +156,7 @@ tokens {
156
156
SYSVAR;
157
157
// UPLUS;
158
158
UMINUS;
159
- VAR; // varaible , referenced through index
159
+ VAR; // variable , referenced through index
160
160
VARPTR; // variable, referenced through pointer
161
161
WHILE;
162
162
}
Original file line number Diff line number Diff line change @@ -906,6 +906,7 @@ void REF_CHECKVNNode::Parameter( EnvBaseT* actEnv)
906
906
ProgNode::interpreter->_retTree = this ->getNextSibling ();
907
907
}
908
908
909
+ // eval the single parameter of a libFunDirect() function (cos(),sin() etc)
909
910
bool ParameterNode::ParameterDirect ( BaseGDL*& pval)
910
911
{
911
912
pval = this ->getFirstChild ()->Eval ();
Original file line number Diff line number Diff line change @@ -684,7 +684,10 @@ BaseGDL** DEREFNode::LEval()
684
684
BaseGDL** QUESTIONNode::EvalRefCheck ( BaseGDL*& rEval)
685
685
{
686
686
ProgNodeP branch = this ->GetThisBranch ();
687
- return branch->EvalRefCheck ( rEval);
687
+ rEval = branch->Eval ();
688
+ return NULL ;
689
+ // was: // return branch->EvalRefCheck( rEval);
690
+ // but crash as reported in #1576 for "a=0 & b=0 & c=0 & z=cos( a ? b:c)" and other strange things.
688
691
}
689
692
690
693
BaseGDL** QUESTIONNode::LEval ()
Original file line number Diff line number Diff line change @@ -109,6 +109,7 @@ class FCALL_LIB_RETNEWNode: public LeafNode
109
109
BaseGDL* Eval ();
110
110
};
111
111
112
+ // For nodes relative to a libFunDirect() function (cos(),sin() etc)
112
113
class FCALL_LIB_DIRECTNode : public LeafNode
113
114
{
114
115
LibFunDirect libFunDirectFun;
You can’t perform that action at this time.
0 commit comments