From 8ff77f0b9f2c903b5025c8fa961f9c02be02ec9c Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Tue, 9 Feb 2021 01:33:17 +0100 Subject: fix(users/Profpatsch/netencode/gen: fix number generator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shouldn’t use the netstring function, since that adds the length of the containing string, which doesn’t make sense for numbers, they just have their one length number and content. Change-Id: I5591f6dd59154c5ef38d6e9b7300d19884a2d57b Reviewed-on: https://cl.tvl.fyi/c/depot/+/2497 Tested-by: BuildkiteCI Reviewed-by: Profpatsch --- users/Profpatsch/netencode/gen.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'users/Profpatsch') diff --git a/users/Profpatsch/netencode/gen.nix b/users/Profpatsch/netencode/gen.nix index 5f98f27f6779..2d2456efeaa5 100644 --- a/users/Profpatsch/netencode/gen.nix +++ b/users/Profpatsch/netencode/gen.nix @@ -8,8 +8,8 @@ let n1 = b: if b then "n1:1," else "n1:0,"; - n = i: n: netstring "n${toString i}" "," (toString n); - i = i: n: netstring "i${toString i}" "," (toString n); + n = i: n: "n${toString i}:${toString n},"; + i = i: n: "i${toString i}:${toString n},"; n3 = n 3; n6 = n 6; -- cgit 1.4.1