Skip to content

Commit

Permalink
fix another incorrect offset ;-;
Browse files Browse the repository at this point in the history
  • Loading branch information
catornot committed Feb 18, 2024
1 parent f4a5796 commit 07f7e7c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ default-target = "x86_64-pc-windows-msvc"
targets = ["x86_64-pc-windows-msvc", "x86_64-pc-windows-gnu"] # hopefully docs.rs will still work

[features]
default = ["async_engine"]
# default = ["async_engine"]
async_engine = []
2 changes: 1 addition & 1 deletion src/high/engine/convars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ impl ConVarStruct {
) -> Result<Self, RegisterError> {
let convar_classes = engine_data.convar;
let convar = unsafe {
let convar = SOURCE_ALLOC.alloc(Layout::new::<ConVar>()) as *mut ConVar;
let convar = SOURCE_ALLOC.alloc_zeroed(Layout::new::<ConVar>()) as *mut ConVar;

addr_of_mut!((*convar).m_ConCommandBase.m_pConCommandBaseVTable)
.write(convar_classes.convar_vtable);
Expand Down
2 changes: 1 addition & 1 deletion src/mid/engine/convars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ offset_functions! {
CVAR_GLOBALS + CvarGlobals for WhichDll::Engine => {
convar_vtable = *mut c_void where offset(0x67FD28);
convar_register = ConVarRegisterType where offset(0x417230);
iconvar_vtable = *mut ConCommandBase where offset(0x67FD28);
iconvar_vtable = *mut ConCommandBase where offset(0x67FDC8);
convar_malloc = ConVarMallocType where offset(0x415C20);
}
}
Expand Down

0 comments on commit 07f7e7c

Please sign in to comment.