Skip to content

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
xNWP committed Mar 3, 2021
1 parent 4778de9 commit 0663ec5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xTGA/src/codecs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2260,8 +2260,8 @@ bool xtga::codecs::DecodeImage(const void* buffer, void*& obuffer, flags::IMAGEO

if (!obuffer)
{
obuffer = (uchar*)malloc((addressable)w * h * depth);
for (addressable i = 0; i < (addressable)w * h * depth; ++i)
obuffer = (uchar*)malloc((addressable)w * h * depth / 8);
for (addressable i = 0; i < (addressable)w * h * depth / 8; ++i)
{
((uchar*)obuffer)[i] = ((uchar*)buffer)[i];
}
Expand Down

0 comments on commit 0663ec5

Please sign in to comment.