We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83ae193 commit bce69aeCopy full SHA for bce69ae
crates/byondapi-rs/src/lib.rs
@@ -29,8 +29,11 @@ pub unsafe fn parse_args(
29
argc: byondapi_sys::u4c,
30
argv: *mut ByondValue,
31
) -> &'static mut [ByondValue] {
32
+ //oh fuck off
33
if argv.is_null() {
- return &[];
34
+ return unsafe {
35
+ std::slice::from_raw_parts_mut(std::ptr::NonNull::<ByondValue>::dangling().as_ptr(), 0)
36
+ };
37
}
38
unsafe { std::slice::from_raw_parts_mut(argv, argc as usize) }
39
0 commit comments