fix: remove_die_from_active now copies data backwards and decrements active count
This commit is contained in:
parent
718bf61d0c
commit
f99d414667
|
@ -26,7 +26,8 @@ size_t add_die_to_active(enum die_type die) {
|
|||
}
|
||||
|
||||
void remove_die_from_active(size_t index) {
|
||||
memmove(active_dice_set + index + 1, active_dice_set + index, MAX_ACTIVE_DICE - index - 1);
|
||||
memcpy(active_dice_set + index, active_dice_set + index + 1, MAX_ACTIVE_DICE - index - 1);
|
||||
--current_active_count;
|
||||
}
|
||||
|
||||
struct roll_result_type roll_active_dice_set(enum die_type die) {
|
||||
|
|
Loading…
Reference in a new issue