So you say that both fields valueint and valuedouble are set in this case and you can read any of them? I expected that double is set only for numbers with a dot (floating point type).
On the other hand, the int and unsigned int have the same size. Doing a cast should work.