@@ -470,7 +470,7 @@ VAL idris_castFloatStr(VM* vm, VAL i) {
470 Closure* cl = allocate(sizeof(Closure) + sizeof(char)*32, 0);
470 Closure* cl = allocate(sizeof(Closure) + sizeof(char)*32, 0);
471 SETTY(cl, STRING);
471 SETTY(cl, STRING);
472 cl -> info.str = (char*)cl + sizeof(Closure);
472 cl -> info.str = (char*)cl + sizeof(Closure);
473− sprintf(cl -> info.str, "%g", GETFLOAT(i));
473+ snprintf(cl -> info.str, 32, "%.16g", GETFLOAT(i));
474 return cl;
474 return cl;