Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit 439e658

Browse files
committed
fixup! Properly support Windows
1 parent 8868147 commit 439e658

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub unsafe fn heap_size_of_impl(mut ptr: *const c_void) -> usize {
6767
let heap = GetProcessHeap();
6868

6969
if ptr as usize % (MIN_ALIGN * 2) != 0 && HeapValidate(heap, 0, ptr) == 0 {
70-
ptr = ptr.offset(-1);
70+
ptr = *(ptr as *const *const c_void).offset(-1);
7171
}
7272

7373
HeapSize(heap, 0, ptr) as usize

0 commit comments

Comments
 (0)