fix to_formatted_s bug

[#77273016]