From 5564ca81b7b1c7ca2861a650d6cb86b320e9f8db Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 23 Feb 2026 14:22:02 -0800 Subject: [PATCH] Don't error out if program buffer has size 0 Resolves #2235 --- riscv/debug_module.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/riscv/debug_module.cc b/riscv/debug_module.cc index 410e0b3d..c7567042 100644 --- a/riscv/debug_module.cc +++ b/riscv/debug_module.cc @@ -38,7 +38,7 @@ static unsigned field_width(unsigned n) static bool region_descriptor_comparator(const region_descriptor &lhs, const region_descriptor &rhs) { - return lhs.addr < rhs.addr; + return lhs.addr < rhs.addr || (lhs.addr == rhs.addr && lhs.len < rhs.len); } template