only change sign when value is not 0
This commit is contained in:
parent
36ae5000a7
commit
00b31876cc
@ -21,7 +21,9 @@ _float f;
|
||||
{
|
||||
char unsigned *p;
|
||||
|
||||
p = (char unsigned *) &f;
|
||||
*p ^= 0x80;
|
||||
if (f != (_float) 0) {
|
||||
p = (char unsigned *) &f;
|
||||
*p ^= 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,9 @@ _double f;
|
||||
{
|
||||
unsigned char *p;
|
||||
|
||||
p = (unsigned char *) &f;
|
||||
*p ^= 0x80;
|
||||
if (f[0] != 0 || f[1] != 0) {
|
||||
p = (unsigned char *) &f;
|
||||
*p ^= 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user