Bug fixes

This commit is contained in:
2025-07-21 23:19:11 +02:00
parent 43627f81ab
commit a67d4dea9f
9 changed files with 23 additions and 35 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ struct HTTP_Router {
HTTP_Router *http_router_init(void)
{
int max_routes = 32;
HTTP_Router *router = malloc(max_routes * sizeof(HTTP_Router));
HTTP_Router *router = malloc(sizeof(HTTP_Router) + max_routes * sizeof(Route));
if (router == NULL)
return NULL;
router->max_routes = max_routes;