diff --git a/src/attributes/object.c b/src/attributes/object.c index c0d0e0800..ae06d6454 100644 --- a/src/attributes/object.c +++ b/src/attributes/object.c @@ -112,7 +112,13 @@ static int object_read(attrib * a, void *owner, struct storage *store) break; case TREAL: READ_FLT(store, &flt); - data->data.real = flt; + if ((int)flt == flt) { + data->type = TINTEGER; + data->data.i = (int)flt; + } + else { + data->data.real = flt; + } break; case TSTRING: READ_STR(store, name, sizeof(name));