From e39852ff2e74b0157d34a7db98d5d6b17b09d9e1 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 12 Feb 2012 18:06:00 +0400 Subject: [PATCH] Make BitArray(unsigned) treat the argument as the number of bytes. --- library/include/BitArray.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/include/BitArray.h b/library/include/BitArray.h index cc1ddc19f..ec9357839 100644 --- a/library/include/BitArray.h +++ b/library/include/BitArray.h @@ -49,8 +49,8 @@ namespace DFHack explicit BitArray(T last) : bits(NULL), size(0) { extend(last); } - explicit BitArray(unsigned last) : bits(NULL), size(0) { - extend(T(last)); + explicit BitArray(unsigned bytes) : bits(NULL), size(0) { + resize(bytes); } void clear_all ( void )