Commit 1c8f01d5 authored by claes's avatar claes

Negative values was rounded erroneously in option menues

parent c0b4e549
......@@ -11386,7 +11386,10 @@ int GeOptionMenu::scan( grow_tObject object)
unsigned int enum_value;
switch( type_id) {
case pwr_eType_Float32: enum_value = (unsigned int) (*(pwr_tFloat32 *) p + 0.5); break;
case pwr_eType_Float32:
enum_value = (unsigned int) (*(pwr_tFloat32 *) p > 0 ?
*(pwr_tFloat32 *)p+0.5 : *(pwr_tFloat32 *)p-0.5);
break;
case pwr_eType_Int32: enum_value = (unsigned int) *(pwr_tInt32 *) p; break;
case pwr_eType_UInt32: enum_value = (unsigned int) *(pwr_tUInt32 *) p; break;
case pwr_eType_Int16: enum_value = (unsigned int) *(pwr_tInt16 *) p; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment