Merge branch 'develop' of https://github.com/h1-mod/h1-mod into develop

This commit is contained in:
fed 2023-05-31 16:18:07 +02:00
commit 01c02d10ff
2 changed files with 5 additions and 3 deletions

View File

@ -35,7 +35,7 @@ namespace gsc
std::unordered_map<std::string, std::uint32_t> init_handles;
utils::memory::allocator scriptfile_allocator;
std::unordered_map<std::string, game::ScriptFile*> loaded_scripts;
std::unordered_map<const char*, game::ScriptFile*> loaded_scripts;
struct
{
@ -108,7 +108,7 @@ namespace gsc
game::ScriptFile* load_custom_script(const char* file_name, const std::string& real_name)
{
if (const auto itr = loaded_scripts.find(real_name); itr != loaded_scripts.end())
if (const auto itr = loaded_scripts.find(file_name); itr != loaded_scripts.end())
{
return itr->second;
}
@ -170,7 +170,7 @@ namespace gsc
script_file_ptr->compressedLen = 0;
loaded_scripts[real_name] = script_file_ptr;
loaded_scripts[file_name] = script_file_ptr;
return script_file_ptr;
}

View File

@ -77,6 +77,8 @@ namespace utils::http
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, 2);
if (!fields.empty())
{
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, fields.data());