1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-25 01:02:24 +00:00

Pass int rather than char to va_arg (the latter gets promoted).

[originally from svn r2167]
This commit is contained in:
Simon Tatham 2002-11-01 12:53:10 +00:00
parent aa3d962ae0
commit 2e25b715e3

4
ssh.c
View File

@ -1253,7 +1253,7 @@ static void construct_packet(Ssh ssh, int pkttype, va_list ap1, va_list ap2)
pktlen += 4;
break;
case PKT_CHAR:
(void) va_arg(ap1, char);
(void) va_arg(ap1, int);
pktlen++;
break;
case PKT_DATA:
@ -1286,7 +1286,7 @@ static void construct_packet(Ssh ssh, int pkttype, va_list ap1, va_list ap2)
p += 4;
break;
case PKT_CHAR:
argchar = va_arg(ap2, unsigned char);
argchar = (unsigned char) va_arg(ap2, int);
*p = argchar;
p++;
break;