mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 08:05:45 +00:00
Make sure that assets that use scriptstrings always have an empty scriptstring at position 0
This commit is contained in:
parent
3cfcfa0c5d
commit
991bcf6d58
@ -40,6 +40,14 @@ scr_string_t AssetLoader::UseScriptString(const scr_string_t scrString)
|
||||
}
|
||||
|
||||
scriptStringIndex = static_cast<scr_string_t>(m_used_script_strings.size());
|
||||
|
||||
// If an asset uses script strings make sure that script string 0 is always empty
|
||||
if(scriptStringIndex == 0 && !scrStringValue.empty())
|
||||
{
|
||||
m_used_script_strings.emplace_back("");
|
||||
scriptStringIndex++;
|
||||
}
|
||||
|
||||
m_used_script_strings.push_back(scrStringValue);
|
||||
|
||||
return scriptStringIndex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user