From 17fe106e2f135c90a0fd574ab0da41f23b367fd8 Mon Sep 17 00:00:00 2001 From: objnull Date: Sun, 8 Sep 2024 21:45:33 -0400 Subject: [PATCH] Maximum string length while typing. --- project/ui/scenes/type.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/project/ui/scenes/type.c b/project/ui/scenes/type.c index 3d8191b..473281b 100644 --- a/project/ui/scenes/type.c +++ b/project/ui/scenes/type.c @@ -1,6 +1,9 @@ // Header #include "type.h" +// Constants +#define KEYBOARD_STR_LEN 64 + // Functions void FP_Scene_Callback_Type(void* context) { // Setting context @@ -25,7 +28,7 @@ void FP_Scene_Enter_Type(void* context) { } // Creating keyboard string - app->keyboard = malloc(sizeof(char*)); + app->keyboard = malloc(sizeof(char*) * KEYBOARD_STR_LEN); // Setting stuff text_input_set_result_callback(