Re: Phix 0.7.8 released

new topic     » goto parent     » topic index » view thread      » older message » newer message
irv said...

Downloaded the latest version today, and I get a crash when running the tests on Linux Mint 64-bit:

Testing[56]: /home/irv/phix/test/t60td.exw 
 
/home/irv/phix/test/t60td.exw:232 
attempt to divide by 0 
 

   s = adjust_timedate(s,timedelta(hours:=7.5))                         
   if s!={2000,1,5, 3, 0,0,4,5,0} then ?9/0 end if 

Thanks for finding that. I can confirm it is not a significant issue, caused by "adjust_timedate() no longer clobbers DT_MSEC aka DT_DOW", and you can safely remove or replace that test as below.

I have changed it to:

--22/3/18 
--s = adjust_timedate(s,timedelta(hours:=7.5))                      if s!={2000,1,5, 3, 0,0,4,5,0} then ?9/0 end if 
s = adjust_timedate(s,timedelta(hours:=7.5))        s[DT_MSEC] = 0  if s!={2000,1,5, 3, 0,0,0,5,0} then ?9/0 end if 

and likewise replaced the 7th entry in the literal constants with zero in the tests all the way down to line 275 (was 4,4,5,5,5,6,0,7,3,4, ie the next 10 tests)

Aside: these routines do not really need to be quite so accurate as those tests - just so long as all the text/format_timedate() tests pass, which they do.

Pete

PS This happened on windows as well - I have been a bit lazy and not fired up a 64 bit linux vm to test it.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu