]> git.marmaro.de Git - mmh/blobdiff - sbr/m_mktemp.c
Fixed places in the code relying the C99-ism of declarations in the
[mmh] / sbr / m_mktemp.c
index aa25636a95eda47cb12171d9fe5e845fe72a7f91..9f99119e1bb04fe88a5b8ad8894f862d596c346f 100644 (file)
@@ -121,7 +121,7 @@ m_mktemp2 (
         /* No directory component */
         return m_mktemp(pfx_in, fd_ret, fp_ret);
     }
-    n = (int)(cp-dir_in-1); /* Length of dir component */
+    n = (int)(cp-dir_in); /* Length of dir component */
     snprintf(buffer, sizeof(buffer), "%.*s%s", n, dir_in, pfx_in);
     return m_mktemp(buffer, fd_ret, fp_ret);
 }