]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Simplify some condition in the tester
authorWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 14:35:04 +0000 (15:35 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Sun, 25 Nov 2012 14:35:04 +0000 (15:35 +0100)
test.c

diff --git a/test.c b/test.c
index 00080689540bdcc1744c52132aa9226052803706..86e76f787b784bf103a00a00428c5f000c388bc9 100644 (file)
--- a/test.c
+++ b/test.c
@@ -619,7 +619,7 @@ bool task_propogate(const char *curdir) {
          * We made it here, which concludes the file/directory is not
          * actually a directory, so it must be a file :)
          */
-        if (strstr(files->d_name, ".tmpl") == &files->d_name[strlen(files->d_name) - (sizeof(".tmpl") - 1)]) {
+        if (strcmp(files->d_name + strlen(files->d_name) - 5, ".tmpl") == 0) {
             task_template_t *template = task_template_compile(files->d_name, curdir);
             char             buf[4096]; /* one page should be enough */
             task_t           task;