about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gatherer.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gatherer.rs b/src/gatherer.rs
index 9bfd63a..36b7468 100644
--- a/src/gatherer.rs
+++ b/src/gatherer.rs
@@ -173,10 +173,15 @@ pub fn make_net_graph(state: &AwakeState) {
 	let kinda_highest = mixed[511 - 32];
 	// We add one here so we have less "surface area" covered by the lines
 	// which makes the vertical divisions look btter
-	let high_bound = ((kinda_highest as f32 / NET_INCREMENTS as f32)
+	let high_bound_whole = (kinda_highest as f32 / NET_INCREMENTS as f32)
 		.ceil()
-		.max(1.0) as usize
-		+ 1) * NET_INCREMENTS;
+		.max(1.0) as usize;
+
+	let high_bound = if high_bound_whole > 1 {
+		high_bound_whole + 1
+	} else {
+		high_bound_whole
+	} * NET_INCREMENTS;
 
 	state
 		.netinfo_upper_bound