Skip to content

Commit 41ff52f

Browse files
urholaukkarinennot-fl3
authored andcommitted
Fixed incorrect file path length on Windows
1 parent b5640a4 commit 41ff52f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

native/sapp-windows/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ unsafe extern "system" fn win32_wndproc(
950950
let path_len =
951951
DragQueryFileW(hdrop, i, path.as_mut_ptr(), MAX_PATH as u32) as usize;
952952
if path_len > 0 {
953-
paths.push(PathBuf::from(OsString::from_wide(&path)));
953+
paths.push(PathBuf::from(OsString::from_wide(&path[..path_len])));
954954
}
955955
}
956956

0 commit comments

Comments
 (0)