General fixes (#1251)

This commit is contained in:
maybegreat48
2023-04-16 18:28:49 +00:00
committed by GitHub
parent 958463d5ff
commit 3c2245f780
46 changed files with 797 additions and 680 deletions

View File

@ -1,9 +1,9 @@
#include "locals_service.hpp"
#include "core/data/all_script_names.hpp"
#include "fiber_pool.hpp"
#include "natives.hpp"
#include "pointers.hpp"
#include "fiber_pool.hpp"
namespace big
{
@ -19,12 +19,13 @@ namespace big
bool locals_service::does_script_exist(std::string script_name)
{
// TODO: find a better way to check script validity
for (auto s : all_script_names)
if (script_name == s)
return true;
bool script_exists = false;
g_fiber_pool->queue_job([&] {script_exists = SCRIPT::DOES_SCRIPT_EXIST(script_name.data());});
return script_exists;
return false;
}
std::filesystem::path locals_service::get_path()

View File

@ -65,7 +65,7 @@ namespace big
{
script_local actual_local = script_local(m_script_thread, m_base_address);
for (auto offset : m_offsets)
for (auto& offset : m_offsets)
{
if (offset.m_size > 0)
actual_local = actual_local.at(offset.m_offset, offset.m_size);