blob: 249ea14a238b8eec29b1808d24cd6b46cdf22949 (
plain)
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
42
43
44
45
46
47
|
$NetBSD: patch-ac,v 1.2 2005/11/03 22:03:18 rillig Exp $
--- src/scav.c.orig 2002-02-10 01:35:36.000000000 +0100
+++ src/scav.c 2005-09-08 14:53:03.000000000 +0200
@@ -240,17 +240,18 @@ void *configtab[]=
-long readlong()
+uint32_t readlong()
{
-long val1=0;
+ uint32_t val1=0;
- val1=myci()<<24L;
- val1|=myci()<<16L;
- val1|=myci()<<8;
- val1|=myci();
+ val1=(myci() & 0xff)<<24L;
+ val1|=(myci() & 0xff)<<16L;
+ val1|=(myci() & 0xff)<<8;
+ val1|=(myci() & 0xff);
return val1;
}
+
int rbs()
{
int ch;
@@ -274,7 +275,7 @@ int myci()
uchar *doiff(uchar *name)
{
-long type,size;
+uint32_t type,size;
uchar comp;
int i,j;
/*
@@ -309,7 +310,7 @@ uchar temparea[256];
bmw=bmh=byteswide=0;
while( (type=readlong()) )
{
- if(type==0xffffffffL) break;
+ if(type==0xffffffff) break;
size=readlong();
if(size&1) size++;
if(type==BMHD)
|