[fpc-devel] MSecsToTimeStamp patch

Michael Van Canneyt michael at freepascal.org
Wed Mar 26 16:36:01 CET 2008



On Wed, 26 Mar 2008, petr.kristan at epos.cz wrote:

> Aritmetic Owerflow, for example MSecsToTimeStamp(63250588800000) //1.5.2005
> Repaired bad typecasting.

Thank you. Applied, rev. 10566.

Would it be possible to send patches as attachments ? 
That makes it easier to save. Thanks.

Michael.

> 
> Index: objpas/sysutils/dati.inc
> ===================================================================
> --- objpas/sysutils/dati.inc    (revision 10368)
> +++ objpas/sysutils/dati.inc    (working copy)
> @@ -75,7 +75,7 @@
>  function MSecsToTimeStamp(MSecs: comp): TTimeStamp;
>  begin
>    result.Date := Trunc(msecs / msecsperday);
> -  msecs:= comp(msecs-result.date*msecsperday);
> +  msecs:= msecs-comp(result.date)*msecsperday;
>    result.Time := Round(MSecs);
>  end ;
> 
> -- 
> Ing. Petr Kristan
> .
> EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice
> tel: +420 466335223    Czech Republic (Eastern Europe) 
> fax: +420 466510709
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 



More information about the fpc-devel mailing list