1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-27 21:53:20 +00:00

Updated so you can update a module that already exists

This commit is contained in:
Bryan Roe
2019-01-11 12:15:56 -08:00
parent b2b2a9187a
commit a6f743658e

View File

@@ -136,7 +136,7 @@ int ILibDuktape_ModSearch_AddModule(duk_context *ctx, char *id, char *module, in
}
duk_pop(ctx); // ...
if (ILibHashtable_Get(table, NULL, id, idLen) != NULL || ILibHashtable_Get(table, ILibDuktape_ModSearch_ModuleFile, id, idLen) != NULL) { return 1; }
//if (ILibHashtable_Get(table, NULL, id, idLen) != NULL || ILibHashtable_Get(table, ILibDuktape_ModSearch_ModuleFile, id, idLen) != NULL) { return 1; }
char *newModule = (char*)ILibDuktape_Memory_Alloc(ctx, moduleLen+1);
memcpy_s(newModule, moduleLen + 1, module, moduleLen);
newModule[moduleLen] = 0;