diff options
author | kleonc <9283098+kleonc@users.noreply.github.com> | 2021-05-08 01:19:18 +0200 |
---|---|---|
committer | kleonc <9283098+kleonc@users.noreply.github.com> | 2021-05-08 13:04:41 +0200 |
commit | 8963be2ef47920cd0c2cd21bfac8d1b83f5c4bdb (patch) | |
tree | 7db75351c81c1d74e187becbefe718816433d6ac /scene | |
parent | 871d067aa9f988e69b860887cceebd243011da06 (diff) |
BitMask::create Don't request more memory than needed when size is a multiply of 8
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/bit_map.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/bit_map.cpp b/scene/resources/bit_map.cpp index e9bfac3653..0ffeb8a5bf 100644 --- a/scene/resources/bit_map.cpp +++ b/scene/resources/bit_map.cpp @@ -38,7 +38,7 @@ void BitMap::create(const Size2 &p_size) { width = p_size.width; height = p_size.height; - bitmask.resize(((width * height) / 8) + 1); + bitmask.resize((((width * height) - 1) / 8) + 1); memset(bitmask.ptrw(), 0, bitmask.size()); } |