File: 40-fix-big-endian-format.patch

package info (click to toggle)
fcrackzip 1.0-11
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 736 kB
  • sloc: ansic: 4,455; sh: 743; makefile: 99; perl: 81
file content (17 lines) | stat: -rw-r--r-- 678 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Description: fix a format issue on big endian
 The warning for %d vs %ld is harmless on little-endian and on arches where
 longs have the same length as ints (ie, 32-bit), but the results can be
 nasty on 64-bit big-endian.
Author: Adam Borowski <kilobyte@angband.pl>

--- fcrackzip-1.0.orig/main.c
+++ fcrackzip-1.0/main.c
@@ -427,7 +427,7 @@ usage (int ec)
 
   printf ("methods compiled in (* = default):\n\n");
   for (crack_method = methods; crack_method->desc; crack_method++)
-    printf ("%c%d: %s\n",
+    printf ("%c%ld: %s\n",
             (crack_method - methods == default_method) ? '*' : ' ',
             crack_method - methods,
             crack_method->desc);