Commit 5df35e87 authored by Lasse Karstensen's avatar Lasse Karstensen Committed by Pål Hermunn Johansen

Stop incorrectly reporting overflow on zeroed ws.

Ref: #2008
parent b392d910
......@@ -116,7 +116,7 @@ pan_ws(struct vsb *vsb, const struct ws *ws)
VSB_printf(vsb, "ws = %p {\n", ws);
VSB_indent(vsb, 2);
PAN_CheckMagic(vsb, ws, WS_MAGIC);
if (!(ws->id[0] & 0x20))
if (ws->id[0] != '\0' && (!(ws->id[0] & 0x20)))
VSB_printf(vsb, "OVERFLOWED ");
VSB_printf(vsb, "id = \"%s\",\n", ws->id);
VSB_printf(vsb, "{s,f,r,e} = {%p", ws->s);
......
......@@ -254,6 +254,7 @@ int
WS_Overflowed(const struct ws *ws)
{
CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
AN(ws->id[0]);
if (ws->id[0] & 0x20)
return (0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment