Skip to content

Commit 93cf72d

Browse files
committed
Fixes #267 dont compare pointer addresses
Signed-off-by: Kyle <[email protected]>
1 parent 2ea05cb commit 93cf72d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/block/block_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ func (i *Info) load() error {
115115
}
116116
for _, diskpartition := range win32DiskPartitionDescriptions {
117117
// Finding disk partition linked to current disk drive
118-
if diskdrive.Index == diskpartition.DiskIndex {
118+
if diskdrive.Index != nil && diskpartition.DiskIndex != nil && *diskdrive.Index == *diskpartition.DiskIndex {
119119
disk.PhysicalBlockSizeBytes = *diskpartition.BlockSize
120120
// Finding logical partition linked to current disk partition
121121
for _, logicaldisk := range win32LogicalDiskDescriptions {

0 commit comments

Comments
 (0)