-
Couldn't load subscription status.
- Fork 174
Description
In ReadSubtreeInt32 I'm slightly puzzled by the intent of the code. If the value that has been read by:
var type = this.ReadValue( out header, out integral, out real32, out real64 );
is actually a double, the result will be in real64 (or real32 for a float). Then later in the switch statement we get to the ReadValueResult.Double case. That casts the value in the integral variable to an Int32 and returns it in the result out param and returns true. However integral will always be zero in that case. I would expect the code to either return false (ie the read failed) or round/truncate real64 to an Int32 if returning true.
Am I missing something about the intent of the code here?