Ref T488 Fixed undefined behaviour in g2clib and libxplanemp.

This commit is contained in:
Mat Sutcliffe
2018-12-26 21:00:51 +00:00
parent 7cb581f865
commit f4a0df315d
2 changed files with 3 additions and 3 deletions

View File

@@ -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);