Skip to content

unpackAsQDPoint crash #4

@ronzo99

Description

@ronzo99

unpackAsQDPoint crashes at:
let point: Rect = descriptor.data.withUnsafeBytes { buffer in
buffer.bindMemory(to: Rect.self)[0]

The fix is to replace "Rect" with "Point" at two places in that line.

This can be tested by targeting Finder, which uses a point for its "desktop position" folder property:

let finder = Finder()
print("TEST: get desktop position of folder "TEMP"")
print(try finder.folders["TEMP"].desktopPosition.get()) // [2301, 554]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions