From f20446534bb7f39425e102bd70daec46e328004f Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Thu, 14 May 2020 14:01:05 -0500 Subject: [PATCH] fix DfOtherVectors computed size --- library/include/BitArray.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/include/BitArray.h b/library/include/BitArray.h index 5858897a3..1f558221a 100644 --- a/library/include/BitArray.h +++ b/library/include/BitArray.h @@ -574,7 +574,7 @@ namespace DFHack { std::vector & operator[](O other_id) { - CHECK_INVALID_ARGUMENT(size_t(other_id) < sizeof(*this) / sizeof(std::vector)); + CHECK_INVALID_ARGUMENT(size_t(other_id) < sizeof(T) / sizeof(std::vector)); auto vectors = reinterpret_cast *>(this); return vectors[other_id];