AK: Append correct number of port characters when serializing a URL

Instead of formatting a port string, it put bytes from stack, using the
port number as a length (so for port 8000 it appended 8000 bytes).
This commit is contained in:
Karol Kosek 2022-06-10 20:37:51 +02:00 committed by Linus Groh
parent c38d3b8520
commit 9e69a89f8e
Notes: sideshowbarker 2024-07-17 10:20:05 +09:00

View file

@ -347,7 +347,7 @@ String URL::serialize_origin() const
builder.append("://"sv);
builder.append(m_host);
if (m_port.has_value())
builder.append(":{}", *m_port);
builder.appendff(":{}", *m_port);
return builder.build();
}