Skip to content

Commit

Permalink
Merge pull request #8 from MattEstHaut/fix/resp
Browse files Browse the repository at this point in the history
Corrige l'encodage de BulkString
  • Loading branch information
MattEstHaut authored May 31, 2024
2 parents 9256d98 + 3637470 commit 67e9bfe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Shared/Resp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public class BulkString : Item

public override string Encode()
{
int len = Encoding.UTF8.GetByteCount(Data);
return $"${len}\r\n{Data}\r\n";
return $"${Data.Length}\r\n{Data}\r\n";
}

public override string ToString() => Data;
Expand Down

0 comments on commit 67e9bfe

Please sign in to comment.