File: 21-unbreak_PIC_mode_unsigned_pixels.patch

package info (click to toggle)
unace-nonfree 2.5-10
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 2,044 kB
  • sloc: ansic: 14,564; makefile: 48; sh: 32; cpp: 21
file content (41 lines) | stat: -rw-r--r-- 1,572 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Author: Daniel Roethlisberger <daniel@roe.ch>
Description: I found and fixed an issue in latest unace-nonfree-2.5 that
 caused archives using PIC mode to be decompressed incorrectly.
 The same bug is also present in upstream unace for Linux and I
 have reported the bug and patch to Marcel Lemke.  However, Marcel
 told me that he does not currently have a dev environment ready,
 so waiting for an upstream fix may take a while.
 .
 Please find the patch that fixes the issues for me attached; if
 you can confirm that it fixes the issue also for you then I would
 suggest you add that patch to the Debian patches for
 unace-nonfree until such a time when Marcel releases a fixed
 upstream version, if ever.
 .
 Also attached is an ACE archive that reproduces the issue;
 without patch I get CRC errors when testing or extracting it,
 with the patch the archive tests and extracts fine.  That ACE
 archive also decompresses fine in WinACE.

--- a/source/base/all/dcpr/pic/c/pic.c
+++ b/source/base/all/dcpr/pic/c/pic.c
@@ -132,7 +132,7 @@ void    BASE_DCPR_PIC_Pixel(void)
 INT       K,
           BestPredictor,
           BestErrorCount;
-CHAR      MEpsilon,
+UCHAR     MEpsilon,
           Predicted;
 SCHAR     Epsilon;
 
--- a/source/base/all/dcpr/pic/pic.h
+++ b/source/base/all/dcpr/pic/pic.h
@@ -24,7 +24,7 @@ typedef struct
                 CurCol,
                 CurState,
                 CurPred;
-        CHAR    PixelA,
+        UCHAR   PixelA,
                 PixelB,
                 PixelC,
                 PixelD,