mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 13:38:19 +00:00
Portability improvement (data alignment issues)
This commit is contained in:
parent
48c4487378
commit
10376b13f5
1 changed files with 3 additions and 2 deletions
|
@ -2716,8 +2716,9 @@ function bytestring_to_double%(s: string%): double
|
||||||
return new Val(0.0, TYPE_DOUBLE);
|
return new Val(0.0, TYPE_DOUBLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
double d = ntohd( *(double *)s->Bytes() );
|
double d;
|
||||||
return new Val(d, TYPE_DOUBLE);
|
memcpy(&d, s->Bytes(), sizeof(double));
|
||||||
|
return new Val(ntohd(d), TYPE_DOUBLE);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
## Converts a reverse pointer name to an address. For example,
|
## Converts a reverse pointer name to an address. For example,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue