try to fix the segfault now?

This commit is contained in:
Charles Descamps 2025-02-05 18:44:58 -07:00
parent b43991414c
commit 46b87dff01

View file

@ -49,8 +49,8 @@ int main(int argc, char **argv)
if(strcmp(message, "time\n") == 0)
{
//
char *reply;
sprintf(&reply, "%d", time(NULL));
char reply[BUFFER_SIZE];
sprintf(reply, "%d", time(NULL));
printf("%s", reply);
// char *reply = time(NULL);
// char *reply = "Replied";