Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: zone def loading #279

Merged
merged 2 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Linker/Linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ class LinkerImpl final : public Linker
return nullptr;
}

// If no type was defined explicitly make it fastfile
if (zoneDefinition->m_type == ProjectType::NONE)
zoneDefinition->m_type = ProjectType::FASTFILE;

if (!IncludeAdditionalZoneDefinitions(targetName, *zoneDefinition, sourceSearchPath))
return nullptr;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ void SequenceZoneDefinitionEntry::ProcessMatch(ZoneDefinitionParserState* state,

const auto& assetNameToken = result.NextCapture(CAPTURE_ASSET_NAME);
std::string assetName;
if (typeNameToken.m_type == ZoneDefinitionParserValueType::STRING)
assetName = typeNameToken.StringValue();
if (assetNameToken.m_type == ZoneDefinitionParserValueType::STRING)
assetName = assetNameToken.StringValue();
else
assetName = typeNameToken.FieldValue();
assetName = assetNameToken.FieldValue();

state->m_definition->m_assets.emplace_back(*maybeAssetType, assetName, result.NextTag() == TAG_REFERENCE);
}