Skip to content

Commit bcab79b

Browse files
Merge pull request #234 from ethangreen-dev/fix-win-types
Fix bad types in lovely-win
2 parents 079e66a + 7aa3752 commit bcab79b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

crates/lovely-win/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use windows::Win32::UI::WindowsAndMessaging::{MessageBoxW, MESSAGEBOX_STYLE};
2222
static RUNTIME: OnceLock<Lovely> = OnceLock::new();
2323

2424
static_detour! {
25-
pub static LuaLoadbufferx_Detour: unsafe extern "C" fn(*mut LuaState, *const u8, isize, *const u8,*const u8) -> u32;
25+
pub static LuaLoadbufferx_Detour: unsafe extern "C" fn(*mut LuaState, *const u8, usize, *const u8,*const u8) -> u32;
2626
}
2727

2828
static WIN_TITLE: LazyLock<U16CString> =
@@ -31,7 +31,7 @@ static WIN_TITLE: LazyLock<U16CString> =
3131
unsafe extern "C" fn lua_loadbufferx_detour(
3232
state: *mut LuaState,
3333
buf_ptr: *const u8,
34-
size: isize,
34+
size: usize,
3535
name_ptr: *const u8,
3636
mode_ptr: *const u8,
3737
) -> u32 {
@@ -87,7 +87,7 @@ unsafe extern "system" fn DllMain(_: HINSTANCE, reason: u32, _: *const c_void) -
8787
let proc = GetProcAddress(handle, s!("luaL_loadbufferx")).unwrap();
8888
let fn_target = std::mem::transmute::<
8989
_,
90-
unsafe extern "C" fn(*mut c_void, *const u8, isize, *const u8, *const u8) -> u32,
90+
unsafe extern "C" fn(*mut c_void, *const u8, usize, *const u8, *const u8) -> u32,
9191
>(proc);
9292

9393
LuaLoadbufferx_Detour

0 commit comments

Comments
 (0)