INNER CODE UNIT · C++
dest
evanbowman/BPCore-Engine · source/BPCoreEngine.cpp:1140
dest = (u8*)umm_malloc(count);
}
if (dest == nullptr) {
luaL_error(L, "not enough memory for memget");
return 1;
}
for (int i = 0; i < count; ++i) {
dest[i] = *((u8*)src++);
}
lua_pushlstring(L, (const char*)dest, count);
if (dest not_eq local_buffer) {
umm_free(dest);
}