Index: image/ind2rgb.m =================================================================== RCS file: /cvs/octave/scripts/image/ind2rgb.m,v retrieving revision 1.19 diff -u -r1.19 ind2rgb.m --- image/ind2rgb.m 26 Apr 2005 19:24:30 -0000 1.19 +++ image/ind2rgb.m 14 Dec 2005 04:30:31 -0000 @@ -39,7 +39,9 @@ [hi, wi] = size (X); - ## XXX FIXME XXX -- we should check size of X and map. + if (size(map,1) < max(X(:))) + error("ind2rgb: color index out of map range") + endif R = reshape (map (X(:), 1), hi, wi); G = reshape (map (X(:), 2), hi, wi); Index: miscellaneous/dir.m =================================================================== RCS file: /cvs/octave/scripts/miscellaneous/dir.m,v retrieving revision 1.5 diff -u -r1.5 dir.m --- miscellaneous/dir.m 6 Dec 2005 16:29:49 -0000 1.5 +++ miscellaneous/dir.m 14 Dec 2005 04:30:31 -0000 @@ -56,9 +56,7 @@ nf = length (flst); if (nf == 0) if (nargout > 0) - ## XXX FIXME XXX -- need a way to create an empty (0x1) - ## structure array. - retval = []; + retval = struct(); else warning ("dir: nonexistent file \"%s\"", file); endif @@ -112,10 +110,8 @@ endif endfor ## Condense results to a single struct array. - ## XXX FIXME XXX -- need a way to create an empty (0x) struct - ## array in case the file is nonexistent. if (nt == 0) - file_list = []; + file_list = struct(); else off = 1; for i = 1:nf