fix DfOtherVectors computed size

develop
Ben Lubar 2020-05-14 14:01:05 -05:00
parent 7dd4b6d968
commit f20446534b
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
1 changed files with 1 additions and 1 deletions

@ -574,7 +574,7 @@ namespace DFHack
{
std::vector<I *> & operator[](O other_id)
{
CHECK_INVALID_ARGUMENT(size_t(other_id) < sizeof(*this) / sizeof(std::vector<I *>));
CHECK_INVALID_ARGUMENT(size_t(other_id) < sizeof(T) / sizeof(std::vector<I *>));
auto vectors = reinterpret_cast<std::vector<I *> *>(this);
return vectors[other_id];