-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] Crash when rearranging drive downwards in the list #2322
Comments
conath
changed the title
Crash when rearranging drive downwards in the list
[iOS] Crash when rearranging drive downwards in the list
Feb 19, 2021
SwiftUI |
osy
added a commit
that referenced
this issue
Feb 22, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue
Crash when rearranging drives. To reproduce, create a VM and go to Configuration → Drives. Add two removable drives. Now tap Edit, then drag the top drive below the second drive. Crash.
Configuration
Crash location
Crash is in NSArray due to index out of bounds. The index where the moved drive is inserted needs to be decremented by one if it is moved past its old position. (e. g. moved from first to second spot, meaning down)
Call stack is:
VMConfigDrivesView.swift
line 113 (moveDrives) [by the way, is that a typo? it only moves one drive]UTMConfiguration+Drives.m
line 194 (moveDrive)The text was updated successfully, but these errors were encountered: