Fix a couple of bugs reported by Ben Kujala
[pspp-builds.git] / src / pfm-read.c
index 52e32325ff450c6259bc37cba15fd28bdeaa45e8..50b15c5433be2f78b64f20e9b625294fd0a26312 100644 (file)
@@ -396,8 +396,11 @@ read_header (struct pfm_reader *r)
 
   /* Skip and verify signature. */
   for (i = 0; i < 8; i++) 
-    if (!match (r, "SPSSPORT"[i]))
-      error (r, _("Missing SPSSPORT signature."));
+    if (!match (r, "SPSSPORT"[i])) 
+      {
+        msg (SE, _("%s: Not a portable file."), handle_get_filename (r->fh));
+        longjmp (r->bail_out, 1);
+      }
 }
 
 /* Reads the version and date info record, as well as product and