mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-20 13:46:06 +00:00
Fix #15 - div by zero in graphics bar
This commit is contained in:
parent
013375c64c
commit
27ca3af8f9
@ -77,7 +77,10 @@ void GraphicsBar::fillData() {
|
||||
int block = mainMap["blocksize"].toInt();
|
||||
int size = (to - from);
|
||||
int num = size / block;
|
||||
int graph_block = w/num;
|
||||
if (num < 1) {
|
||||
num = 1;
|
||||
}
|
||||
int graph_block = w / num;
|
||||
int counter = 0;
|
||||
|
||||
for (auto i : mainMap["blocks"].toList()) {
|
||||
|
Loading…
Reference in New Issue
Block a user