mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-10-05 13:28:04 +03:00
parts: RemoveController returns delegate indices
The returned integer array contains p->delegate_index, not p->no. I don't think this caused any bugs, because the game code rejects returned indices that are > the delegate array length, and the delegate index appears to always be -1 when this function is called.
This commit is contained in:
+1
-1
@@ -2157,7 +2157,7 @@ void PE_RemoveController(struct page **erase_number_list, int index)
|
||||
struct parts *next = TAILQ_NEXT(p, parts_list_entry);
|
||||
if (p->controller_no == ctrl_no) {
|
||||
*erase_number_list = array_pushback(*erase_number_list,
|
||||
(union vm_value){.i = p->no}, AIN_ARRAY_INT, -1);
|
||||
(union vm_value){.i = p->delegate_index}, AIN_ARRAY_INT, -1);
|
||||
parts_release(p->no);
|
||||
}
|
||||
p = next;
|
||||
|
||||
Reference in New Issue
Block a user