Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit 9d57cff

Browse files
committed
Fix EnvironIndex and GlobalsIndex
GG Me
1 parent 4b0785d commit 9d57cff

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/globals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ pub mod Lua {
1010
pub static AUTHORS: &'static str = "R. Ierusalimschy, L. H. de Figueiredo & W. Celes";
1111

1212
pub static REGISTRYINDEX: CInt = -10000;
13-
pub static ENVIRONINDEX: CInt = -10000;
14-
pub static GLOBALSINDEX: CInt = -10000;
13+
pub static ENVIRONINDEX: CInt = -10001;
14+
pub static GLOBALSINDEX: CInt = -10002;
1515

1616
pub static MULTRET: CInt = -1;
1717
pub static SIGNATURE: &'static str = "\x1bLua";

src/lib.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,8 @@ pub static LUA_SHAREDR: Lazy< Result< LuaSharedLibrary, dlopen::Error> > = Lazy:
192192
});
193193

194194
pub static LUA_SHARED: Lazy< &LuaSharedLibrary > = Lazy::new(|| {
195-
let dll_path = match &*LUA_SHARED_PATH {
196-
Some(path) => path,
197-
None => panic!("Couldn't get lua_shared location. Make sure it's at GarrysMod/bin/ or GarrysMod/garrysmod/bin/")
198-
};
199-
200195
match &*LUA_SHAREDR {
201196
Ok(lib) => lib, // We shouldn't need a mutable LuaSharedLibrary.
202-
Err(why) => panic!("Path DLL tried to load: {}, Error Reason: {}. Report this on github.", dll_path.display(), why)
197+
Err(why) => panic!("Couldn't load lua_shared.dll. Error Reason: {}. Report this on github.", why)
203198
}
204199
});

0 commit comments

Comments
 (0)