pspp-dump-sav: Number variables in cases starting from 1.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 5 Sep 2023 15:34:52 +0000 (08:34 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 5 Sep 2023 15:34:52 +0000 (08:34 -0700)
The variables are numbered starting from 1 elsewhere in the output, so they
should be in the cases as well.

Bug #64621.
Thanks to Daniel for reporting this bug.

utilities/pspp-dump-sav.c

index 05b89b52caa3fa7ec0215f28ef4691be1a2595ea..47c6aa83e425cbee9e699e8b73fdda154bd72707 100644 (file)
@@ -1291,7 +1291,7 @@ read_simple_compressed_data (struct sfm_reader *r, int max_cases)
             }
           opcode = opcodes[opcode_idx];
           printf ("%08llx: variable %d: opcode %d: ",
-                  opcode_ofs + opcode_idx, i, opcode);
+                  opcode_ofs + opcode_idx, i + 1, opcode);
 
           switch (opcode)
             {