about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/other/pamtopfm.c4
-rw-r--r--doc/HISTORY2
2 files changed, 4 insertions, 2 deletions
diff --git a/converter/other/pamtopfm.c b/converter/other/pamtopfm.c
index f8fdc96b..44a8ab08 100644
--- a/converter/other/pamtopfm.c
+++ b/converter/other/pamtopfm.c
@@ -273,10 +273,10 @@ main(int argc, char **argv ) {
 
     pnm_init(&argc, argv);
 
-    parseCommandLine(argc, argv, &cmdline);
-
     machineEndianness = thisMachineEndianness();
 
+    parseCommandLine(argc, argv, &cmdline);
+
     ifP = pm_openr(cmdline.inputFilespec);
 
     tuplenArray = pnm_readpamn(ifP, &pam, sizeof(pam));
diff --git a/doc/HISTORY b/doc/HISTORY
index 21cf249c..cf9bd4c9 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,8 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.40.00
 
+              pamtopfm: Fix wrong determination of machine endianness.
+
               Fix uninitialized variable in pnm_allocpamrown().
 
               Rename pamtooctave to pamtooctaveimg.