[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UDUNITS #VZB-644403]: Bug in deprecated udunits 1.12.9



Hi Christian,

[Sorry for taking so long to respond. I was on holiday.]

> The code needs to be modified slightly to ensure that if conditions are met .
> If not the double precision very small leftovers are interfering and
> prevents the code to go into the if condition when needed.
> 
> In unitcore.c, line 536, adding:
> 
> if ((float)seconds >= 60.0) {
> seconds = 0.0;
> if ((float)++minutes >= 60) {
> minutes = 0.0;
> if ((float)++hours >= 24) {
> hours = 0.0;
> days++;
> }
> }
> }
> else if ((float)minutes >= 60) {
> minutes = 0.0;
> if ((float)++hours >= 24) {
> hours = 0.0;
> days++;
> }
> }
> else if ((float)hours >= 24) {
> hours = 0.0;
> days++;
> }

I copied the improvements from the UDUNITS-1 to the UDUNITS-2 code and made a 
new release (2.1.24).

Thanks for reporting this.

> Christian

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: VZB-644403
Department: Support UDUNITS
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.