diff --git a/ash/src/entry.rs b/ash/src/entry.rs index e323aa0..b27fd64 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -194,10 +194,12 @@ impl Entry { unsafe { let mut api_version = 0; let enumerate_instance_version: Option = { - let name = b"vkEnumerateInstanceVersion\0".as_ptr() as *const _; + let name = ::std::ffi::CStr::from_bytes_with_nul_unchecked( + b"vkEnumerateInstanceVersion\0", + ); mem::transmute((self.static_fn.get_instance_proc_addr)( vk::Instance::null(), - name, + name.as_ptr(), )) }; if let Some(enumerate_instance_version) = enumerate_instance_version {