mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-01-26 09:42:25 +00:00
Pass int rather than char to va_arg (the latter gets promoted).
[originally from svn r2167]
This commit is contained in:
parent
aa3d962ae0
commit
2e25b715e3
4
ssh.c
4
ssh.c
@ -1253,7 +1253,7 @@ static void construct_packet(Ssh ssh, int pkttype, va_list ap1, va_list ap2)
|
|||||||
pktlen += 4;
|
pktlen += 4;
|
||||||
break;
|
break;
|
||||||
case PKT_CHAR:
|
case PKT_CHAR:
|
||||||
(void) va_arg(ap1, char);
|
(void) va_arg(ap1, int);
|
||||||
pktlen++;
|
pktlen++;
|
||||||
break;
|
break;
|
||||||
case PKT_DATA:
|
case PKT_DATA:
|
||||||
@ -1286,7 +1286,7 @@ static void construct_packet(Ssh ssh, int pkttype, va_list ap1, va_list ap2)
|
|||||||
p += 4;
|
p += 4;
|
||||||
break;
|
break;
|
||||||
case PKT_CHAR:
|
case PKT_CHAR:
|
||||||
argchar = va_arg(ap2, unsigned char);
|
argchar = (unsigned char) va_arg(ap2, int);
|
||||||
*p = argchar;
|
*p = argchar;
|
||||||
p++;
|
p++;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user