From 308f885855d6c8d5ac9a841aee6bf316dff0dcd9 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 26 May 2009 21:43:05 -0400 Subject: [PATCH] Since directories are added to SourceFileLists, don't mistake as extensions. --- src/sourcefile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sourcefile.c b/src/sourcefile.c index 8b2d114..ef08872 100644 --- a/src/sourcefile.c +++ b/src/sourcefile.c @@ -25,7 +25,7 @@ SourceFile *ohcount_sourcefile_new(const char *filepath) { while (p > sourcefile->filepath && *(p - 1) != '.' && *(p - 1) != '/' && *(p - 1) != '\\') p--; - sourcefile->ext = p; + sourcefile->ext = (*(p - 1) == '.') ? p : sourcefile->filepath + length; while (p > sourcefile->filepath && *(p - 1) != '/' && *(p - 1) != '\\') p--; -- 2.32.0.93.g670b81a890