fix: only load the gsc files with the right magic

This commit is contained in:
Jari van der Kaap 2023-05-04 23:23:42 +02:00
parent dd10c8e347
commit cf9c856c4d

View File

@ -69,7 +69,7 @@ namespace script
{ {
std::string data; std::string data;
auto script_file = script.generic_string(); auto script_file = script.generic_string();
if (!std::filesystem::is_directory(script) && utils::io::read_file(script_file, &data)) if (!std::filesystem::is_directory(script) && utils::io::read_file(script_file, &data) && *(int*)data.c_str() == 0x43534780)
{ {
print_loading_script(script_file); print_loading_script(script_file);
load_script(script_file, data); load_script(script_file, data);