--- gforth/engine/ecvt.c 1998/12/08 22:03:02 1.3 +++ gforth/engine/ecvt.c 2000/09/23 15:06:07 1.6 @@ -1,6 +1,6 @@ /* cheap ecvt replacement - Copyright (C) 1998 Free Software Foundation, Inc. + Copyright (C) 1998,2000 Free Software Foundation, Inc. This file is part of Gforth. @@ -32,7 +32,6 @@ char* ecvt(double x, int len, int* exp, { int i, j; double z; - fprintf(stderr, "using own ecvt\n"); if(len > (MAXCONV-1)) len = MAXCONV-1; @@ -57,6 +56,7 @@ char* ecvt(double x, int len, int* exp, for(i=0; i < len; i++) { z=floor(x); + if(z<0) z = 0; scratch[i]='0'+(char)((int)z); x = (x-z)*10; } @@ -95,3 +95,4 @@ int main(int argc, char ** argv) printf("ecvt Test: %f -> %s, %d, %d\n",9e0,conv,a,b); } #endif +