mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 10:55:32 +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)
|
// Set Sign bit (bit 31 - leftmost bit)
|
||||||
//
|
//
|
||||||
if (a[j] < 0.0) {
|
if (a[j] < 0.0) {
|
||||||
ieee= 1 << 31;
|
ieee= (g2int)(1u << 31);
|
||||||
atemp=-1.0*a[j];
|
atemp=-1.0*a[j];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ieee= 0 << 31;
|
ieee= 0;
|
||||||
atemp=a[j];
|
atemp=a[j];
|
||||||
}
|
}
|
||||||
//printf("sign %ld %x \n",ieee,ieee);
|
//printf("sign %ld %x \n",ieee,ieee);
|
||||||
|
|||||||
Submodule src/xswiftbus/libxplanemp updated: 71fb70f94e...bae6bdc06a
Reference in New Issue
Block a user