Skip to content

Commit

Permalink
AURORA: Throw on GFF4 with shared string and ASCII string fields
Browse files Browse the repository at this point in the history
We have no example GFF4 file with shared strings and ASCII string
fields, so we don't know whether these fields use the shared string
table.
  • Loading branch information
DrMcCoy committed Nov 17, 2016
1 parent 9c0d38e commit d444fa3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/aurora/gff4file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ void GFF4Struct::load(GFF4File &parent, uint32 offset, const GFF4File::StructTem
loadStructs(parent, f);
if (f.type == kFieldTypeGeneric)
loadGeneric(parent, f);

if ((f.type == kFieldTypeASCIIString) && parent.hasSharedStrings())
throw Common::Exception("GFF4: TODO: ASCII string field in a file with shared strings");
}

_fieldCount = _fields.size();
Expand Down Expand Up @@ -508,6 +511,9 @@ void GFF4Struct::load(GFF4File &parent, const Field &genericParent) {
loadStructs(parent, f);
if (f.type == kFieldTypeGeneric)
throw Common::Exception("GFF4: Found a generic with type generic?");

if ((f.type == kFieldTypeASCIIString) && parent.hasSharedStrings())
throw Common::Exception("GFF4: TODO: ASCII string field in a file with shared strings");
}

_fieldCount = genericCount;
Expand Down

0 comments on commit d444fa3

Please sign in to comment.