shithub: riscv

Download patch

ref: 676f990fbbe3bb4e245a79ce665fdf9f55ffd3cc
parent: 820c6acc6049d8d4fdf6111eebdd568266a8065b
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Tue Oct 18 11:07:07 EDT 2022

zuke: fix wrong string width of playback position calculated on network streams

--- a/sys/src/cmd/audio/zuke/zuke.c
+++ b/sys/src/cmd/audio/zuke/zuke.c
@@ -304,8 +304,9 @@
 				dur/1000
 			);
 		}else{
-			i += snprint(tmp+i, sizeof(tmp)-i, "%P ", msec/1000);
+			j = snprint(tmp+i, sizeof(tmp)-i, "%P ", msec/1000);
 			w += stringwidth(f, tmp+i);
+			i += j;
 		}
 	}
 	snprint(tmp+i, sizeof(tmp)-i, "%d%%", 100);