diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 6afe28a6a721..88b3f157caf0 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -1696,7 +1696,7 @@ String String::num_scientific(double p_num) { // MinGW requires _set_output_format() to conform to C99 output for printf unsigned int old_exponent_format = _set_output_format(_TWO_DIGIT_EXPONENT); #endif - snprintf(buf, 256, "%lg", p_num); + snprintf(buf, 256, "%.16lg", p_num); #if defined(__MINGW32__) && defined(_TWO_DIGIT_EXPONENT) && !defined(_UCRT) _set_output_format(old_exponent_format);