diff options
author | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-30 20:18:13 +0530 |
---|---|---|
committer | Raghuram Subramani <raghus2247@gmail.com> | 2025-07-30 20:18:13 +0530 |
commit | 8e6dad06fe4c0bb83f44ff016c3814b9c89f385b (patch) | |
tree | ddd4c6339f6c73c88f8c03c05e29c9774b09eeae /src/template.c | |
parent | 48016ebbe55051ea4745c57cbc937d2a66c22ef9 (diff) |
template: template_create() must accept template name
Diffstat (limited to 'src/template.c')
-rw-r--r-- | src/template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/template.c b/src/template.c index 73b21e4..6773986 100644 --- a/src/template.c +++ b/src/template.c @@ -32,12 +32,12 @@ extern msg_t *msg; template_t * -template_create(void) +template_create(char *template_name) { template_t *template = malloc(sizeof(template_t)); char *path; - asprintf(&path, "%s/%s/%s", msg->base_directory, TEMPLATES, BASE_TEMPLATE); + asprintf(&path, "%s/%s/%s", msg->base_directory, TEMPLATES, template_name); FILE *base = fopen(path, "r"); free(path); |