From 09305cc7da0803fb8c4a523a3509ed459b059c6d Mon Sep 17 00:00:00 2001 From: Klim Tsoutsman Date: Fri, 6 Jan 2023 01:45:23 +1100 Subject: [PATCH] Correctly allocate last frame in memory descriptor `end_frame` is inclusive. Signed-off-by: Klim Tsoutsman --- common/src/legacy_memory_region.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/legacy_memory_region.rs b/common/src/legacy_memory_region.rs index 8177a6a6..17999c0b 100644 --- a/common/src/legacy_memory_region.rs +++ b/common/src/legacy_memory_region.rs @@ -68,7 +68,7 @@ where self.next_frame = start_frame; } - if self.next_frame < end_frame { + if self.next_frame <= end_frame { let ret = self.next_frame; self.next_frame += 1; Some(ret)