aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2026-02-11 20:11:35 +0100
committerLaytan Laats <laytanlaats@hotmail.com>2026-02-11 20:11:35 +0100
commitea6867ed613433640523333146d4a77d23059cf7 (patch)
tree4d7e51dcdf09004dfccfc6afbdf6373b3bea0b66
parentd49ab07d35d59aef5be659be4e9e0d80dbff1e41 (diff)
Revert "fix wrong allocator in `endpoint_to_string`"
This reverts commit f755839877b2c565f8087d22c13e475b145829c3.
-rw-r--r--core/net/addr.odin4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/net/addr.odin b/core/net/addr.odin
index b75a10562..d29b46b65 100644
--- a/core/net/addr.odin
+++ b/core/net/addr.odin
@@ -608,13 +608,13 @@ address_to_string :: proc(addr: Address, allocator := context.temp_allocator) ->
return strings.to_string(b)
}
-// Returns a temporarily-allocated string representation of the endpoint (if allocator isn't overwritten).
+// Returns a temporarily-allocated string representation of the endpoint.
// If there's a port, uses the `ip4address:port` or `[ip6address]:port` format, respectively.
endpoint_to_string :: proc(ep: Endpoint, allocator := context.temp_allocator) -> string {
if ep.port == 0 {
return address_to_string(ep.address, allocator)
} else {
- s := address_to_string(ep.address, allocator)
+ s := address_to_string(ep.address, context.temp_allocator)
b := strings.builder_make(allocator)
switch a in ep.address {
case IP4_Address: