about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-04-06 21:49:48 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-04-06 21:49:48 +0000
commita65e1203bdb94ec2873e3ba7dad910096eaecb25 (patch)
tree59783e9af7b4d991c6b6f03d01708361237224ce
parentb182d5152851ad7aeeb31e1658dda0b2b46101de (diff)
downloadnetpbm-mirror-a65e1203bdb94ec2873e3ba7dad910096eaecb25.tar.gz
netpbm-mirror-a65e1203bdb94ec2873e3ba7dad910096eaecb25.tar.xz
netpbm-mirror-a65e1203bdb94ec2873e3ba7dad910096eaecb25.zip
Fix bug from revision 1771: says types are different when they aren't
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1871 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--analyzer/pnmpsnr.c8
-rw-r--r--doc/HISTORY3
2 files changed, 7 insertions, 4 deletions
diff --git a/analyzer/pnmpsnr.c b/analyzer/pnmpsnr.c
index ce2708b5..b04316cf 100644
--- a/analyzer/pnmpsnr.c
+++ b/analyzer/pnmpsnr.c
@@ -55,14 +55,14 @@ validateInput(struct pam const pam1,
                  "maxval of one of them.",
                  (unsigned int) pam1.maxval, (unsigned int) pam2.maxval);
 
-    if (streq(pam1.tuple_type, pam2.tuple_type))
+    if (!streq(pam1.tuple_type, pam2.tuple_type))
         pm_error("images are not of the same type.  The tuple types are "
                  "'%s' and '%s', respectively.",
                  pam1.tuple_type, pam2.tuple_type);
 
-    if (streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) &&
-        streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) &&
-        streq(pam1.tuple_type, PAM_PPM_TUPLETYPE))
+    if (!streq(pam1.tuple_type, PAM_PBM_TUPLETYPE) &&
+        !streq(pam1.tuple_type, PAM_PGM_TUPLETYPE) &&
+        !streq(pam1.tuple_type, PAM_PPM_TUPLETYPE))
         pm_error("Images are not of a PNM type.  Tuple type is '%s'",
                  pam1.tuple_type);
 }
diff --git a/doc/HISTORY b/doc/HISTORY
index 080a2034..2227eeef 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,9 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.63.00
 
+              pnmpsnr: fix bug: says types aren't the same when they are.
+              Introduced in 10.61 (December 2012).
+
 12.03.28 BJH  Release 10.62.00
 
               pnmtorast: set don't care bytes to zero to make output