Skip to content
Snippets Groups Projects
Commit 8300835e authored by Olivier Sauter's avatar Olivier Sauter
Browse files

check dim before using it

parent 05f31c10
No related branches found
No related tags found
1 merge request!13check dim before using it
Pipeline #17267 passed
......@@ -497,7 +497,7 @@ if strcmp(mapping_for_tcv.method(1:3),'tdi')
gdat_data.x = gdat_data.dim(dim_nontim);
end
end
if mapping_for_tcv.timedim>0; gdat_data.t = gdat_data.dim{mapping_for_tcv.timedim}; end
if length(gdat_data.dim)>=mapping_for_tcv.timedim && mapping_for_tcv.timedim>0; gdat_data.t = gdat_data.dim{mapping_for_tcv.timedim}; end
gdat_data.units = aatmp.units;
gdat_data.dimunits = aatmp.dimunits;
if mapping_for_tcv.gdat_timedim>0 && mapping_for_tcv.gdat_timedim ~= mapping_for_tcv.timedim
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment