From a717edd12ee8226930684b353d6fbea8e43b39d3 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Wed, 19 Nov 2014 15:24:08 -0500 Subject: [PATCH] Fix bug? --- CLTool/src/tc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CLTool/src/tc.cpp b/CLTool/src/tc.cpp index d5942ed..a576931 100644 --- a/CLTool/src/tc.cpp +++ b/CLTool/src/tc.cpp @@ -92,7 +92,7 @@ void ExtractBasename(const char *filename, char *buf, size_t bufSz) { size_t len = strlen(filename); const char *end = filename + len; const char *ext = end; - const char *base = filename; + const char *base = NULL; while(--end != filename && !base) { if(*end == '.') { ext = end; @@ -321,7 +321,7 @@ int main(int argc, char **argv) { } if (ci->GetWidth() != img.GetWidth() || - ci->GetHeight() != img.GetHeight()) { + ci->GetHeight() != img.GetHeight()) { fprintf(stderr, "Cannot compute image metrics: compressed and uncompressed dimensions differ.\n"); } else { double PSNR = img.ComputePSNR(ci);