mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-20 00:02:55 +00:00
Fix error messages on error when loading gdt
This commit is contained in:
parent
41b4fb8c9a
commit
49f19d95c2
@ -397,7 +397,7 @@ class Linker::Impl
|
||||
const auto gdtFile = gdtSearchPath->Open(i->second->m_value + ".gdt");
|
||||
if (!gdtFile.IsOpen())
|
||||
{
|
||||
std::cout << "Failed to open file for gdt \"" << i->second << "\"" << std::endl;
|
||||
std::cout << "Failed to open file for gdt \"" << i->second->m_value << "\"" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -126,15 +126,12 @@ bool GdtReader::ReadProperties(GdtEntry& entry)
|
||||
if (!ReadStringContent(propertyKey))
|
||||
return false;
|
||||
|
||||
if (PeekChar() != '"')
|
||||
if (PeekChar() != '"' || !ReadStringContent(propertyValue))
|
||||
{
|
||||
PrintError("Expected value string");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ReadStringContent(propertyValue))
|
||||
return false;
|
||||
|
||||
entry.m_properties.emplace(std::move(propertyKey), std::move(propertyValue));
|
||||
}
|
||||
|
||||
@ -207,7 +204,10 @@ bool GdtReader::Read(Gdt& gdt)
|
||||
{
|
||||
NextChar();
|
||||
if (!ReadStringContent(entry.m_gdf_name))
|
||||
{
|
||||
PrintError("Expected gdf name string");
|
||||
return false;
|
||||
}
|
||||
if (NextChar() != ')')
|
||||
{
|
||||
PrintError("Expected closing parenthesis");
|
||||
@ -219,7 +219,10 @@ bool GdtReader::Read(Gdt& gdt)
|
||||
NextChar();
|
||||
std::string parentName;
|
||||
if (!ReadStringContent(parentName))
|
||||
{
|
||||
PrintError("Expected parent name string");
|
||||
return false;
|
||||
}
|
||||
if (NextChar() != ']')
|
||||
{
|
||||
PrintError("Expected closing square brackets");
|
||||
@ -238,6 +241,7 @@ bool GdtReader::Read(Gdt& gdt)
|
||||
}
|
||||
else
|
||||
{
|
||||
PrintError("Expected gdf or parent opening");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user