Sigh. Microsoft Visual C++ 6.0 won't convert a "guint64" to a "double"

- it only allows you to convert a *signed* 64-bit integer to a "double".
Cast the result of "pletohll()" to "gint64" before returning it from a
function that returns a "double".

svn path=/trunk/; revision=3033
This commit is contained in:
Guy Harris 2001-02-14 09:38:10 +00:00
parent f6f6aa6424
commit 33ca70bed1
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* netxray.c
*
* $Id: netxray.c,v 1.35 2001/02/13 00:50:05 guy Exp $
* $Id: netxray.c,v 1.36 2001/02/14 09:38:10 guy Exp $
*
* Wiretap Library
* Copyright (c) 1998 by Gilbert Ramirez <gram@xiexie.org>
@ -108,7 +108,7 @@ static gboolean netxray_dump_close_1_1(wtap_dumper *wdh, int *err);
static double netxray_ticks2double(netxray_ticks *t)
{
# ifdef G_HAVE_GINT64
return pletohll(t);
return (gint64)pletohll(t);
# else
return pletohl(&t->lo) +
pletohl(&t->hi) * 4294967296.0;