From d6037472b4bbff809092f3ec2c9328b663956224 Mon Sep 17 00:00:00 2001
From: Paul Oliver <contact@pauloliver.dev>
Date: Thu, 29 Feb 2024 02:29:13 +0100
Subject: Bug fixed on cursor's process selection process.

[#1] Cursor process selection loop was searching for processes under
the cursor by iterating based on process count, instead of process
queue capacity.
---
 bin/printer.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'bin')

diff --git a/bin/printer.py b/bin/printer.py
index 135e220..04c9865 100644
--- a/bin/printer.py
+++ b/bin/printer.py
@@ -814,7 +814,7 @@ class Printer:
 		# Now, iterate all living processes and try to find one that owns the
 		# calculated address.
 		if self._sim.lib.sal_mem_is_address_valid(address):
-			for proc_id in range(self._sim.lib.sal_proc_get_count()):
+			for proc_id in range(self._sim.lib.sal_proc_get_capacity()):
 				if not self._sim.lib.sal_proc_is_free(proc_id):
 					proc_data = (c_uint32 * len(self._proc_elements))()
 					self._sim.lib.sal_proc_get_proc_data(proc_id, cast(
-- 
cgit v1.2.1