Changeset 13268


Ignore:
Timestamp:
11/19/15 00:45:03 (4 years ago)
Author:
bburlacu
Message:

#2442: Fix potential out of bounds exception when getting variable values in the SymbolicDataAnalysisExpressionTreeLinearInterpreter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs

    r13254 r13268  
    144144        if (instr.opCode == OpCodes.Variable) {
    145145          if (row < 0 || row >= dataset.Rows) instr.value = double.NaN;
    146           var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
    147           instr.value = ((IList<double>)instr.data)[row] * variableTreeNode.Weight;
     146          else {
     147            var variableTreeNode = (VariableTreeNode)instr.dynamicNode;
     148            instr.value = ((IList<double>)instr.data)[row] * variableTreeNode.Weight;
     149          }
    148150        } else if (instr.opCode == OpCodes.LagVariable) {
    149151          var laggedVariableTreeNode = (LaggedVariableTreeNode)instr.dynamicNode;
Note: See TracChangeset for help on using the changeset viewer.