From 142476586656a8771d7d8303bb51e97981cb9d60 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Sat, 20 Oct 2012 21:19:04 -0400 Subject: [PATCH] Fix bug where we forgot to store the new height and width --- Core/src/Image.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/src/Image.cpp b/Core/src/Image.cpp index e876a7a..fb94f4a 100644 --- a/Core/src/Image.cpp +++ b/Core/src/Image.cpp @@ -12,7 +12,10 @@ static inline T sad( const T &a, const T &b ) { return (a > b)? a - b : b - a; } -Image::Image(const CompressedImage &ci) { +Image::Image(const CompressedImage &ci) + : m_Width(ci.GetWidth()) + , m_Height(ci.GetHeight()) +{ unsigned int bufSz = ci.GetWidth() * ci.GetHeight() * 4; m_PixelData = new uint8[ bufSz ]; if(!m_PixelData) { fprintf(stderr, "%s\n", "Out of memory!"); return; }