Fixed float variables display.

This commit is contained in:
Eric Pouech 2001-04-23 18:10:32 +00:00 committed by Alexandre Julliard
parent 4f46b5de45
commit d6dcec833e
1 changed files with 8 additions and 0 deletions

View File

@ -380,6 +380,14 @@ DEBUG_GetExprValue(const DBG_VALUE* _value, char** format)
&& ((rtn >> (value.type->un.basic.basic_size * 8 - 1)) != 0)) {
rtn = rtn | ((-1) << (value.type->un.basic.basic_size * 8));
}
/* float type has to be promoted as a double */
if (value.type->un.basic.basic_type == BASIC_FLT) {
float f;
double d;
memcpy(&f, &rtn, sizeof(f));
d = (double)f;
memcpy(&rtn, &d, sizeof(rtn));
}
if (value.type->un.basic.output_format != NULL) {
def_format = value.type->un.basic.output_format;
}