First convert the string to a number, then convert it to network byte order.

That should squelch some warnings from the compiler on the OS X
buildbot.

Change-Id: I0da16469fb48e26677c5366d6fe290db2bf52a10
Reviewed-on: https://code.wireshark.org/review/14619
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2016-03-24 14:19:31 -07:00
parent a4aa8930bb
commit b0db6a01a8
1 changed files with 2 additions and 1 deletions

View File

@ -227,7 +227,8 @@ static int parse_line(char* packet _U_, unsigned* offset, char* line, int status
part = parts;
while(*part) {
if (strlen(*part) > 1) {
value = (guint32)htonl(strtoul(*part, NULL, 16));
value = (guint32)strtoul(*part, NULL, 16);
value = htonl(value);
size = strlen(*part) / 2;
memcpy(packet + *offset, &value, size);
*offset += (guint32)size;