diff --git a/CLTool/src/decomp.cpp b/CLTool/src/decomp.cpp index ba8d9e2..e808acf 100644 --- a/CLTool/src/decomp.cpp +++ b/CLTool/src/decomp.cpp @@ -71,7 +71,6 @@ int main(int argc, char **argv) { ImageFile imgf (argv[1]); if(!imgf.Load()) { - fprintf(stderr, "Error loading file: %s\n", argv[1]); return 1; } diff --git a/CLTool/src/tc.cpp b/CLTool/src/tc.cpp index fcd38aa..e617e5f 100644 --- a/CLTool/src/tc.cpp +++ b/CLTool/src/tc.cpp @@ -53,6 +53,7 @@ #define _CRT_SECURE_NO_WARNINGS #define WIN32_LEAN_AND_MEAN +#include #include #include #include diff --git a/CMakeLists.txt b/CMakeLists.txt index d8beeae..b8865ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,8 @@ IF(MSVC) SET(MSVC_VERSION_STRING vc100) ELSEIF(MSVC11) SET(MSVC_VERSION_STRING vc110) + ELSEIF(MSVC12) + SET(MSVC_VERSION_STRING vc120) ELSEIF(MSVC90) SET(MSVC_VERSION_STRING vc90) ELSEIF(MSVC80) diff --git a/IO/src/FileStreamUnix.cpp b/IO/src/FileStreamUnix.cpp index 0124050..775175a 100644 --- a/IO/src/FileStreamUnix.cpp +++ b/IO/src/FileStreamUnix.cpp @@ -95,7 +95,9 @@ public: } ~FileStreamImpl() { - fclose(m_FilePtr); + if (0 != m_FilePtr) { + fclose(m_FilePtr); + } } void IncreaseReferenceCount() { m_ReferenceCount++; } diff --git a/IO/src/ImageLoader.cpp b/IO/src/ImageLoader.cpp index 9250116..cbc9a23 100644 --- a/IO/src/ImageLoader.cpp +++ b/IO/src/ImageLoader.cpp @@ -209,29 +209,33 @@ FasTC::Image<> *ImageLoader::LoadImage() { for(uint32 i = 0; i < aw; i++) { unsigned int redVal = GetChannelForPixel(i, j, 0); - if(redVal == INT_MAX) + if(redVal == INT_MAX) { return NULL; + } unsigned int greenVal = redVal; unsigned int blueVal = redVal; if(GetGreenChannelPrecision() > 0) { greenVal = GetChannelForPixel(i, j, 1); - if(greenVal == INT_MAX) + if(greenVal == INT_MAX) { return NULL; + } } if(GetBlueChannelPrecision() > 0) { blueVal = GetChannelForPixel(i, j, 2); - if(blueVal == INT_MAX) + if(blueVal == INT_MAX) { return NULL; + } } unsigned int alphaVal = 0xFF; if(GetAlphaChannelPrecision() > 0) { alphaVal = GetChannelForPixel(i, j, 3); - if(alphaVal == INT_MAX) + if(alphaVal == INT_MAX) { return NULL; + } } // Red channel diff --git a/Windows b/Windows index 4feeeb6..6d9f6ba 160000 --- a/Windows +++ b/Windows @@ -1 +1 @@ -Subproject commit 4feeeb6550851ba3541c3f9505c76018e665667e +Subproject commit 6d9f6ba0f9ebec0f6735b1f29527ea5835ef3572