Author: tkreuzer
Date: Mon Jan 3 11:00:28 2011
New Revision: 50275
URL:
http://svn.reactos.org/svn/reactos?rev=50275&view=rev
Log:
[CRT]
Fix a bug in _ecvt that makes msvcrt_winetest::printf crash
Modified:
trunk/reactos/lib/sdk/crt/stdlib/ecvt.c
Modified: trunk/reactos/lib/sdk/crt/stdlib/ecvt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/ecvt.c?…
==============================================================================
--- trunk/reactos/lib/sdk/crt/stdlib/ecvt.c [iso-8859-1] (original)
+++ trunk/reactos/lib/sdk/crt/stdlib/ecvt.c [iso-8859-1] Mon Jan 3 11:00:28 2011
@@ -18,6 +18,7 @@
static char ecvtbuf[DBL_MAX_10_EXP + 10];
char *cvtbuf, *s, *d;
+ if (ndigits < 0) ndigits = 0;
s = cvtbuf = (char*)malloc(ndigits + NUMBER_EFMT);
d = ecvtbuf;