diff options
| author | louist103 <35883445+louist103@users.noreply.github.com> | 2021-09-23 13:02:07 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-23 13:02:07 -0400 |
| commit | cc481b7945d3940f2343b1b646cd53733440f1a4 (patch) | |
| tree | 3a4c6e192485fdcbe460798193ff58503bda04fd /ZAPD/ZFile.cpp | |
| parent | 405fc13eaaefe04c73593c5c4565e43a60fd47c2 (diff) | |
Error if RangeStart is after RangeEnd (#190)
* Error if RangeStart is after RangeEnd
* Delete BuildInfo.h
Diffstat (limited to 'ZAPD/ZFile.cpp')
| -rw-r--r-- | ZAPD/ZFile.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ZAPD/ZFile.cpp b/ZAPD/ZFile.cpp index 3709771..6186205 100644 --- a/ZAPD/ZFile.cpp +++ b/ZAPD/ZFile.cpp @@ -109,6 +109,9 @@ void ZFile::ParseXML(ZFileMode mode, XMLElement* reader, std::string filename, if (reader->Attribute("RangeEnd") != nullptr) rangeEnd = StringHelper::StrToL(reader->Attribute("RangeEnd"), 16); + if( rangeStart > rangeEnd ) + throw std::runtime_error("Error: RangeStart must be before than RangeEnd."); + // Commented until ZArray doesn't use a ZFile to parse it's contents anymore. /* if (reader->Attribute("Segment") == nullptr) |
