Explorar o código

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).
Karol Kosek %!s(int64=3) %!d(string=hai) anos
pai
achega
9e69a89f8e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AK/URL.cpp

+ 1 - 1
AK/URL.cpp

@@ -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();
 }