Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit 596d08a

Browse files
committed
cache_vrt: Print NAN when converting NAN to string
1 parent c71cfba commit 596d08a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

bin/varnishd/cache/cache_vrt.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,8 @@ VRT_REAL_string(VRT_CTX, VCL_REAL num)
770770
{
771771

772772
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
773+
if (isnan(num))
774+
return ("NAN");
773775
if (!VRT_REAL_is_valid(num))
774776
VRT_fail(ctx, "REAL overflow converting to string (%e)", num);
775777
return (WS_Printf(ctx->ws, "%.3f", num));

0 commit comments

Comments
 (0)