commit adb54b6ee21d7b6c56089de7421f5e731c11912d
Author:     Quentin Rameau <[email protected]>
AuthorDate: Mon Jul 4 16:15:45 2016 +0200
Commit:     Quentin Rameau <[email protected]>
CommitDate: Mon Jul 4 16:15:45 2016 +0200

    [driver] fix variables order in outfname() printf()

diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index b1ffc02..f82422a 100644
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -159,7 +159,7 @@ outfname(char *path, char *type)
 
        newsz = pathln + 1 + strlen(type) + 1;
        new = xmalloc(newsz);
-       n = snprintf(new, newsz, "%.*s%c%s", path, pathln, sep, type);
+       n = snprintf(new, newsz, "%.*s%c%s", pathln, path, sep, type);
        if (n < 0 || n >= newsz)
                die("scc: wrong output filename");
        if ((tmpfd = mkstemp(new)) < 0 && errno != EINVAL)

Reply via email to