Skip to content

Conversation

@sni
Copy link

@sni sni commented Dec 18, 2025

using windows.UTF16ToString() converts a []uint16 to a string but ends after the first NUL. There is already a split0() function which does the right thing in this file, so simply use that one.

before:

getLogicalDrives() -> ['C:\']

after:

getLogicalDrives() -> ['C:\', 'D:\', 'Z:\']

using windows.UTF16ToString() converts a []uint16 to a string but ends after the first NUL.
There is already a split0() function which does the right thing in this file, so simply use
that one.

before:

    getLogicalDrives() -> ['C:\']

after:

    getLogicalDrives() -> ['C:\', 'D:\', 'Z:\']

Signed-off-by: Sven Nierlein <sven@consol.de>
@StefanoBalzarottiNozomi
Copy link
Contributor

@sni thank you so much for the fix, can you please add a test?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants