diff options
Diffstat (limited to 'DirectVolume.cpp')
| -rw-r--r-- | DirectVolume.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/DirectVolume.cpp b/DirectVolume.cpp index fa3eb9a..2ddd5ab 100644 --- a/DirectVolume.cpp +++ b/DirectVolume.cpp @@ -207,8 +207,8 @@ void DirectVolume::handlePartitionAdded(const char *devpath, NetlinkEvent *evt) #ifdef PARTITION_DEBUG SLOGD("Dv:partAdd: part_num = %d, minor = %d\n", part_num, minor); #endif - if (part_num > MAX_PARTITIONS) { - SLOGE("Dv:partAdd: ignoring part_num = %d (max: %d)\n", part_num, MAX_PARTITIONS); + if (part_num >= MAX_PARTITIONS) { + SLOGE("Dv:partAdd: ignoring part_num = %d (max: %d)\n", part_num, MAX_PARTITIONS-1); } else { mPartMinors[part_num -1] = minor; } |
