changeset 18539:7b60d0d9f0f2

imwrite.m: Fix bug with numfields introduction in cset fcd87f68af4f. imwrite.m: Change sense of if test from > 0 to == 0.
author Rik <rik@octave.org>
date Mon, 03 Mar 2014 07:07:06 -0800
parents fcd87f68af4f
children 2f5685c080e5
files scripts/image/imwrite.m
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/image/imwrite.m	Sun Mar 02 12:56:11 2014 -0800
+++ b/scripts/image/imwrite.m	Mon Mar 03 07:07:06 2014 -0800
@@ -100,7 +100,7 @@
   fmt = imformats (ext);
   ## When there is no match, fmt will be a 1x1 structure with
   ## no fields, so we can't just use `isempty (fmt)'.
-  if (numfields (fmt) > 0)
+  if (numfields (fmt) == 0)
     if (isempty (ext))
       error ("imwrite: no extension found for %s to identify the image format",
              filename);