forked from github/server
convert float values in at_object to integer where it makes sense.
this feature is only used for the embassy_muschel turn, and I am tempted to kill it entirely.
This commit is contained in:
parent
67881dfff4
commit
ea035ac154
|
@ -112,7 +112,13 @@ static int object_read(attrib * a, void *owner, struct storage *store)
|
||||||
break;
|
break;
|
||||||
case TREAL:
|
case TREAL:
|
||||||
READ_FLT(store, &flt);
|
READ_FLT(store, &flt);
|
||||||
|
if ((int)flt == flt) {
|
||||||
|
data->type = TINTEGER;
|
||||||
|
data->data.i = (int)flt;
|
||||||
|
}
|
||||||
|
else {
|
||||||
data->data.real = flt;
|
data->data.real = flt;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TSTRING:
|
case TSTRING:
|
||||||
READ_STR(store, name, sizeof(name));
|
READ_STR(store, name, sizeof(name));
|
||||||
|
|
Loading…
Reference in New Issue