From 97906129dad88f5897c17d1c5af010b966356d5f Mon Sep 17 00:00:00 2001 From: Krisztian Litkey Date: Mon, 14 Oct 2024 19:29:01 +0300 Subject: [PATCH] libmem: parse node ranges as inclusive. Signed-off-by: Krisztian Litkey --- pkg/resmgr/lib/memory/nodes.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/resmgr/lib/memory/nodes.go b/pkg/resmgr/lib/memory/nodes.go index f35adae27..3822009f0 100644 --- a/pkg/resmgr/lib/memory/nodes.go +++ b/pkg/resmgr/lib/memory/nodes.go @@ -235,7 +235,7 @@ func ParseNodeMask(str string) (NodeMask, error) { return 0, fmt.Errorf("%w: invalid range (%d - %d) in node mask %q", ErrInvalidNodeMask, beg, end, str) } - for id := beg; id < end; id++ { + for id := beg; id <= end; id++ { if id > MaxNodeID { return 0, fmt.Errorf("%w: invalid node ID in mask %q (range %d-%d)", ErrInvalidNodeMask, str, beg, end)