about summary refs log tree commit diff
path: root/users/Profpatsch/netencode/gen.nix
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-02-09T00·33+0100
committerProfpatsch <mail@profpatsch.de>2021-02-09T01·36+0000
commit8ff77f0b9f2c903b5025c8fa961f9c02be02ec9c (patch)
treec6f9ed24392c5a9cfa31ccd19af54349686cfa23 /users/Profpatsch/netencode/gen.nix
parent60b79b2d9d07b35496c221ad3651f2d2fee74b21 (diff)
fix(users/Profpatsch/netencode/gen: fix number generator r/2193
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 <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/netencode/gen.nix')
-rw-r--r--users/Profpatsch/netencode/gen.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/Profpatsch/netencode/gen.nix b/users/Profpatsch/netencode/gen.nix
index 5f98f27f67..2d2456efea 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;