From 3b05c59b556339a2ed38f951cea1a0a9c109b002 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 28 May 2013 11:11:11 +0200 Subject: [PATCH] Test for ijk dimention match before reading data Whitespace fixup p4#: 21749 --- OctavePlugin/riSetGridProperty.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OctavePlugin/riSetGridProperty.cpp b/OctavePlugin/riSetGridProperty.cpp index 5923b29138..3641f590ea 100644 --- a/OctavePlugin/riSetGridProperty.cpp +++ b/OctavePlugin/riSetGridProperty.cpp @@ -136,15 +136,15 @@ DEFUN_DLD (riSetGridProperty, args, nargout, return octave_value_list (); } std::vector argIndices; - argIndices.push_back(0); - argIndices.push_back(1); - argIndices.push_back(2); - argIndices.push_back(3); - argIndices.push_back(4); - argIndices.push_back(5); + argIndices.push_back(0); // Array data + argIndices.push_back(1); // Case Id + argIndices.push_back(2); // GridIndex + argIndices.push_back(3); // Property name + argIndices.push_back(4); // Time step indices + argIndices.push_back(5); // Porosity model - // Check if we have a CaseId: - if (!args(argIndices[1]).is_numeric_type()) + // Check if we do not have a CaseId: + if (args(argIndices[2]).is_string()) // Check if second argument is a text. If it is, the caseid is missing { argIndices[1] = -1; for (size_t aIdx = 2; aIdx < argIndices.size(); ++aIdx)