shithub: pplay

Download patch

ref: 443ab2b67e807ff1c4f864feb80229ecd7813fe5
parent: 94b590804e2c148200288f0e2081b2a24d9b8ee3
author: qwx <qwx@sciops.net>
date: Wed Nov 30 02:12:28 EST 2022

p2c: fix off-by-one

if p is exactly 0, must cross over to next chunk

--- a/cmd.c
+++ b/cmd.c
@@ -116,7 +116,7 @@
 
 	assert(p < totalsz);
 	c = norris.right;
-	while(p > c->bufsz){
+	while(p >= c->bufsz){
 		p -= c->bufsz;
 		c = c->right;
 	}