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