PATCH: dlls/oleaut32/variant.c -- minor fix
Gerald Pfeifer
gerald at pfeifer.com
Sat Nov 8 04:47:40 CST 2003
This is really dead code on all of our current (and most probably also
future platforms): USHRT_MAX is 2^16 which is smaller than DATE_MAX which
is 2958465.
Gerald
ChangeLog:
Wrap "dead code" into proper #if/#endif in VarDateFromUI2().
Index: oleaut32/variant.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/variant.c,v
retrieving revision 1.74
diff -u -3 -p -r1.74 variant.c
--- oleaut32/variant.c 28 Oct 2003 21:45:31 -0000 1.74
+++ oleaut32/variant.c 8 Nov 2003 10:44:05 -0000
@@ -3113,10 +3113,12 @@ HRESULT WINAPI VarDateFromUI2(USHORT uiI
{
TRACE("( %d, %p ), stub\n", uiIn, pdateOut );
+#if USHRT_MAX > DATE_MAX
if( uiIn > DATE_MAX )
{
return DISP_E_OVERFLOW;
}
+#endif
*pdateOut = (DATE) uiIn;
More information about the wine-patches
mailing list