Casting to int in mg_sprintf() call in handle_cgi

This commit is contained in:
Sergey Lyubka committed 2014-01-29 12:34:51 +00:00
1 parent ddbe690698
commit 1957879e10
1 file changed
+1 -1
+1 -1
View File
@@ -1141,7 +1141,7 @@ static void open_cgi_endpoint(struct connection *conn, const char *prog) {
if ((p = strrchr(prog, '/')) == NULL) {
mg_snprintf(dir, sizeof(dir), "%s", ".");
} else {
mg_snprintf(dir, sizeof(dir), "%.*s", p - prog, prog);
mg_snprintf(dir, sizeof(dir), "%.*s", (int) (p - prog), prog);
}
// Try to create socketpair in a loop until success. mg_socketpair()