From a75b7ca352adab1dd1e788c25e784cf4b77cca01 Mon Sep 17 00:00:00 2001 From: AfonsoCMSousa Date: Thu, 27 Feb 2025 12:06:44 +0000 Subject: [PATCH] Small fix to the size of the pathfile. --- src/server.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 0bec35f..26bea05 100644 --- a/src/server.c +++ b/src/server.c @@ -92,7 +92,11 @@ int main(void) // TYPE == 0 is the equivelent of a GET if (req.type == 0) { - char *filepath = PASSWORDS; + char *filepath = create(char); + filepath = size(filepath, 256); + + strcpy(filepath, PASSWORDS); + sprintf(filepath, "%s%d.bin", filepath, req.level); if (readl(filepath, buffer, 256) == -1) {