Fix overlay next_index for unnamed targets (#14562)

This commit is contained in:
neil4 2022-10-29 09:33:34 -05:00 committed by GitHub
parent cab6cbca48
commit 1dd165a3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -335,7 +335,7 @@ static bool task_overlay_resolve_targets(struct overlay *ol,
{
struct overlay_desc *desc = (struct overlay_desc*)&current->descs[i];
const char *next = desc->next_index_name;
ssize_t next_idx = (idx + 1) & size;
ssize_t next_idx = (idx + 1) % size;
if (!string_is_empty(next))
{