commit: f6a3c084f33d8e80002931a6dd9230e6369b52cf
parent dd65bfd0780da6511869fb35a0413e4f4aaf6a5d
Author: Devine Lu Linvega <aliceffekt@gmail.com>
Date: Wed, 20 Oct 2021 21:44:06 -0700
Update main.c
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main.c b/src/main.c
@@ -252,8 +252,8 @@ build_recipe(Recipe *recipe)
{
char filename[STR_BUF_LEN];
to_lowercase(recipe->name, filename, STR_BUF_LEN);
- char filepath[STR_BUF_LEN];
- snprintf(filepath, STR_BUF_LEN, "../site/%s.html", filename);
+ char filepath[128];
+ snprintf(filepath, 128, "../site/%s.html", filename);
FILE *f = fopen(filepath, "w");
fprintf(f, html_head, recipe->name, "recipe");
@@ -297,8 +297,8 @@ build_ingredient(Recipe *recipes[], int recipes_len, Ingredient *ingredient)
{
char filename[STR_BUF_LEN];
to_lowercase(ingredient->name, filename, STR_BUF_LEN);
- char filepath[STR_BUF_LEN];
- snprintf(filepath, STR_BUF_LEN, "../site/%s.html", filename);
+ char filepath[128];
+ snprintf(filepath, 128, "../site/%s.html", filename);
FILE *f = fopen(filepath, "w");
fprintf(f, html_head, ingredient->name, "ingredient");