blob: df029a6f15d6d4b0091ec036bea06f0838a5ac1e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
--- bad/netcat-0.7.1/src/flagset.c 2003-12-10 17:18:07.000000000 +0100
+++ good/netcat-0.7.1/src/flagset.c 2007-03-04 17:38:10.000000000 +0100
@@ -134,7 +134,7 @@
int netcat_flag_count(void)
{
- register char c;
+ register unsigned char c;
register int i;
int ret = 0;
@@ -154,8 +154,8 @@
Assumed that the bit number 1 is the sign, and that we will shift the
bit 1 (or the bit that takes its place later) until the the most right,
WHY it has to keep the wrong sign? */
- ret -= (c >> 7);
- c <<= 1;
+ ret += (c & 1);
+ c >>= 1;
}
}
|