mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-11 08:36:38 -04:00
if plugin filename ends with _32, ignore it on 64 bit OS (and vice versa)
This commit is contained in:
parent
dcf1b9a49e
commit
4072b62439
@ -512,8 +512,7 @@ void Inflate_Process(struct InflateState* state) {
|
||||
nlen = Inflate_ReadBits(state, 16);
|
||||
|
||||
if (len != (nlen ^ 0xFFFFUL)) {
|
||||
Inflate_Fail(state, INF_ERR_BLOCKTYPE);
|
||||
return;
|
||||
Inflate_Fail(state, INF_ERR_BLOCKTYPE); return;
|
||||
}
|
||||
state->Index = len; /* Reuse for 'uncompressed length' */
|
||||
state->State = INFLATE_STATE_UNCOMPRESSED_DATA;
|
||||
@ -625,8 +624,7 @@ void Inflate_Process(struct InflateState* state) {
|
||||
|
||||
count = state->NumLits + state->NumDists;
|
||||
if (state->Index + repeatCount > count) {
|
||||
Inflate_Fail(state, INF_ERR_REPEAT_END);
|
||||
return;
|
||||
Inflate_Fail(state, INF_ERR_REPEAT_END); return;
|
||||
}
|
||||
|
||||
Mem_Set(&state->Buffer[state->Index], repeatValue, repeatCount);
|
||||
|
@ -342,6 +342,10 @@ static void LoadPlugin(const String* path, void* obj) {
|
||||
|
||||
/* ignore accepted.txt, deskop.ini, .pdb files, etc */
|
||||
if (!String_CaselessEnds(path, &DynamicLib_Ext)) return;
|
||||
/* don't try to load 32 bit plugins on 64 bit OS or vice versa */
|
||||
if (sizeof(void*) == 4 && String_ContainsConst(path, "_64.")) return;
|
||||
if (sizeof(void*) == 8 && String_ContainsConst(path, "_32.")) return;
|
||||
|
||||
lib = DynamicLib_Load2(path);
|
||||
if (!lib) { Logger_DynamicLibWarn("loading", path); return; }
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user