mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 10:28:34 +00:00
Fixed when the float value of "%f" is inf, it should be formatted as "Inf" instead of "0.0"
This commit is contained in:
parent
7e784d5453
commit
9789c6e911
@ -254,6 +254,12 @@ void AddFloat(char **buf_p, size_t &maxlen, double fval, int width, int prec, in
|
||||
return;
|
||||
}
|
||||
|
||||
if (std::isinf(fval))
|
||||
{
|
||||
AddString(buf_p, maxlen, "Inf", width, prec, flags | NOESCAPE);
|
||||
return;
|
||||
}
|
||||
|
||||
// default precision
|
||||
if (prec < 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user