summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2018-02-08 20:28:31 +0100
committerPali Rohár <pali.rohar@gmail.com>2018-02-08 20:28:31 +0100
commit2fd11378c8a350e124183dd833470c0a904375fd (patch)
treed56bf6f25ecb7c073697ab869aecba2d447def7a
parent808ce724eef5d8d1371522e7c02e612ee5fdc886 (diff)
download0xFFFF-2fd11378c8a350e124183dd833470c0a904375fd.tar.bz2
disk: Fix swapping maj1:min1 and maj2:min2
-rw-r--r--src/disk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/disk.c b/src/disk.c
index a608693..87e2c39 100644
--- a/src/disk.c
+++ b/src/disk.c
@@ -390,7 +390,7 @@ int disk_init(struct usb_device_info * dev) {
}
/* Ensure that maj1:min1 is first device and maj2:min2 is second device */
- if ( min2 < min1 ) {
+ if ( min2 != -1 && min2 < min1 ) {
tmp = min1;
min1 = min2;
min2 = tmp;