From d4a4b71eb31f04ef65a5e32ac203128ea0c0bf16 Mon Sep 17 00:00:00 2001 From: KaffeeMaus Date: Fri, 26 Jan 2024 12:18:16 +0100 Subject: [PATCH] refactoring: commend a function --- src/main/c/Georg/tictactoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/c/Georg/tictactoe.c b/src/main/c/Georg/tictactoe.c index 89fc6a5..d3b3c29 100644 --- a/src/main/c/Georg/tictactoe.c +++ b/src/main/c/Georg/tictactoe.c @@ -64,11 +64,11 @@ int handleCommand( char* input ){ commandFunction getCommandById( int id ){ commandFunction result = NULL; - size_t arraySize = sizeof(COMMANDS) / sizeof(COMMANDS[0]); + size_t arraySize = sizeof(COMMANDS) / sizeof(COMMANDS[0]); // calculate size of Array for (size_t i = 0; i < arraySize; i++) { //printf( "%s", COMMANDS[i].description ); if( COMMANDS[i].id == id ){ - result = COMMANDS[i].fun; + result = COMMANDS[i].fun; // save the function pointer as result break; } }