mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T488 Fixed undefined behaviour in g2clib and libxplanemp.
This commit is contained in:
@@ -66,11 +66,11 @@ void mkieee(g2float *a,g2int *rieee,g2int num)
|
||||
// Set Sign bit (bit 31 - leftmost bit)
|
||||
//
|
||||
if (a[j] < 0.0) {
|
||||
ieee= 1 << 31;
|
||||
ieee= (g2int)(1u << 31);
|
||||
atemp=-1.0*a[j];
|
||||
}
|
||||
else {
|
||||
ieee= 0 << 31;
|
||||
ieee= 0;
|
||||
atemp=a[j];
|
||||
}
|
||||
//printf("sign %ld %x \n",ieee,ieee);
|
||||
|
||||
Reference in New Issue
Block a user