Skip to content

Commit 589d040

Browse files
committed
Fixed a bug where a single colon reference would be rejected by MappedTensor and TIFFStack.
1 parent 1a9125a commit 589d040

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

MappedTensor.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,11 +1456,20 @@ function make_complex(mtVar)
14561456
% for subscript referencing
14571457
function isvalidsubscript(oRefs)
14581458
try
1459+
% - Test for colon
1460+
if (iscolon(oRefs))
1461+
return;
1462+
end
1463+
14591464
if (islogical(oRefs))
1465+
% - Test for logical indexing
14601466
validateattributes(oRefs, {'logical'}, {'binary'});
1467+
14611468
else
1469+
% - Test for normal indexing
14621470
validateattributes(oRefs, {'single', 'double'}, {'integer', 'real', 'positive'});
14631471
end
1472+
14641473
catch
14651474
error('MappedTensor:badsubscript', ...
14661475
'*** MappedTensor: Subscript indices must either be real positive integers or logicals.');

0 commit comments

Comments
 (0)