summaryrefslogtreecommitdiff
path: root/appl/lib
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2025-08-13 09:27:32 +0100
committerGitHub <noreply@github.com>2025-08-13 09:27:32 +0100
commitd7b29f497205f48247d2bab33340bd7ace64de4d (patch)
treef1cd8a62bfaf379e1d7bcb0641c1e586bea74667 /appl/lib
parent2279329d3013d42db413cddc01b9cd9e08ddab12 (diff)
parent30edc625bd8381f4efe736d1fab2e8c6d38c50a5 (diff)
Merge pull request #28 from vsrinivas/venti-zero-score-fixHEADmaster
venti: Session.read(): Handle reads for 0-score/any type locally
Diffstat (limited to 'appl/lib')
-rw-r--r--appl/lib/venti.b4
1 files changed, 4 insertions, 0 deletions
diff --git a/appl/lib/venti.b b/appl/lib/venti.b
index cfb3a8ec..d2f9db9a 100644
--- a/appl/lib/venti.b
+++ b/appl/lib/venti.b
@@ -323,6 +323,10 @@ Session.new(fd: ref Sys->FD): ref Session
Session.read(s: self ref Session, score: Score, etype: int, maxn: int): array of byte
{
+ if (Score.eq(score, Score.zero()) {
+ return array[0] of byte;
+ }
+
(gm, err) := s.rpc(ref Vmsg.Tread(1, 0, score, etype, maxn));
if(gm == nil){
sys->werrstr(err);