mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-10-29 14:05:40 +00:00
Make sure that assets that use scriptstrings always have an empty scriptstring at position 0
This commit is contained in:
1 parent
3cfcfa0c5d
commit
991bcf6d58
1 file changed
+8
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user