explicit precedence
it was possible to enter if at curWidth == 0
which is not desired intention at all
Vladimir Bauer
2 years ago
| 234 | 234 | var fillCount int |
| 235 | 235 | curWidth := int(internal.PercentageRound(stat.Total, stat.Current, uint(width))) |
| 236 | 236 | |
| 237 | if curWidth != 0 && !stat.Completed || s.tipOnComplete { | |
| 237 | if curWidth != 0 && (!stat.Completed || s.tipOnComplete) { | |
| 238 | 238 | tip = s.tip.frames[s.tip.count%uint(len(s.tip.frames))] |
| 239 | 239 | s.tip.count++ |
| 240 | 240 | fillCount += tip.width |