telnet: fix "cast increases required alignment of target type"
This commit is contained in:
@@ -710,7 +710,6 @@ static void printsub(struct SessionHandle *data,
|
|||||||
size_t length) /* length of suboption data */
|
size_t length) /* length of suboption data */
|
||||||
{
|
{
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
unsigned short *pval;
|
|
||||||
|
|
||||||
if(data->set.verbose) {
|
if(data->set.verbose) {
|
||||||
if(direction) {
|
if(direction) {
|
||||||
@@ -763,9 +762,9 @@ static void printsub(struct SessionHandle *data,
|
|||||||
|
|
||||||
switch(pointer[0]) {
|
switch(pointer[0]) {
|
||||||
case CURL_TELOPT_NAWS:
|
case CURL_TELOPT_NAWS:
|
||||||
pval = (unsigned short*)(pointer+1);
|
if(length > 4)
|
||||||
infof(data, "Width: %hu ; Height: %hu",
|
infof(data, "Width: %hu ; Height: %hu", (pointer[1]<<8) | pointer[2],
|
||||||
ntohs(pval[0]), ntohs(pval[1]));
|
(pointer[3]<<8) | pointer[4]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
switch(pointer[1]) {
|
switch(pointer[1]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user