fix panic on projecteblocks

This commit is contained in:
Gustavo Chain 2020-02-14 11:54:30 +01:00
parent 25daa49e22
commit 2eb974ca2a
No known key found for this signature in database
GPG Key ID: DA7C1746DC118A46

View File

@ -258,6 +258,10 @@ func (ui *UI) printProjectedBlock(n int) []byte {
offset := 9 - int(
float64(block.BlockWeight)/4000000.0*10,
)
if offset < 0 {
offset = 0
}
for i := offset; i < len(lines); i++ {
lines[i] = bg("%s", lines[i])
}