diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim index eb3d276e0..3e170172b 100644 --- a/lib/system/sysstr.nim +++ b/lib/system/sysstr.nim @@ -292,7 +292,7 @@ proc nimFloatToStr(f: float): string {.compilerproc.} = buf[n+2] = '\0' # On Windows nice numbers like '1.#INF', '-1.#INF' or '1.#NAN' are produced. # We want to get rid of these here: - if buf[n-1] == 'N': + if buf[n-1] in {'n', 'N'}: result = "nan" elif buf[n-1] == 'F': if buf[0] == '-':