ref: aad36c645ab7b9ab376a935ca7aa63b7d303c46f
parent: f817308f74d2dbba82b177e730d2ce4ccec84906
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Oct 30 20:28:18 EDT 2022
zuke: don't fall into the rathole
--- a/sys/src/cmd/audio/zuke/zuke.c
+++ b/sys/src/cmd/audio/zuke/zuke.c
@@ -291,11 +291,13 @@
shuffle != nil ? "∫" : "",
(rg || repeatone || shuffle != nil) ? " " : ""
);
- msec = dur = 0;
+ msec = 0;
+ dur = 0;
w = stringwidth(f, tmp);
if(pcurplaying >= 0){
msec = byteswritten*1000/Bps;
- if((dur = getmeta(pcurplaying)->duration) > 0){
+ dur = getmeta(pcurplaying)->duration;
+ if(dur > 0){
snprint(tmp+i, sizeof(tmp)-i, "%P/%P ", dur/1000, dur/1000);
w += stringwidth(f, tmp+i);
msec = MIN(msec, dur);