rework ldso handling of global symbol table for consistency
[musl] / src / stdlib / ecvt.c
index 48e70cd..797b664 100644 (file)
@@ -1,3 +1,4 @@
+#define _GNU_SOURCE
 #include <stdlib.h>
 #include <stdio.h>
 
@@ -13,7 +14,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;
 }