about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/stdlib/ecvt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stdlib/ecvt.c b/src/stdlib/ecvt.c
index 48e70cd8..79c3de63 100644
--- a/src/stdlib/ecvt.c
+++ b/src/stdlib/ecvt.c
@@ -13,7 +13,7 @@ char *ecvt(double x, int n, int *dp, int *sign)
 	for (j=0; tmp[i]!='e'; j+=(tmp[i++]!='.'))
 		buf[j] = tmp[i];
 	buf[j] = 0;
-	*dp = atoi(tmp+i+1);
+	*dp = atoi(tmp+i+1)+1;
 
 	return buf;
 }