mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
increased possible input size for color
This commit is contained in:
+2
-1
@@ -4,7 +4,8 @@ project(fastfetch)
|
||||
|
||||
include (${CMAKE_ROOT}/Modules/FindX11.cmake)
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -march=native -O3 -pipe -fno-plt") # for testing
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -march=native -O3 -pipe -fno-plt")
|
||||
|
||||
add_executable(fastfetch
|
||||
src/fastfetch.c
|
||||
|
||||
+2
-2
@@ -268,9 +268,9 @@ static void parseArguments(int argc, char** argv, FFstate* state)
|
||||
exit(42);
|
||||
}
|
||||
size_t len = strlen(argv[i + 1]);
|
||||
if(len > 7)
|
||||
if(len > 28)
|
||||
{
|
||||
printf("Error: max color string length is 7, %zu given\n", len);
|
||||
printf("Error: max color string length is 28, %zu given\n", len);
|
||||
exit(43);
|
||||
}
|
||||
sprintf(state->color, "\033[%sm", argv[i + 1]);
|
||||
|
||||
+2
-2
@@ -25,7 +25,7 @@ typedef struct FFlogo
|
||||
uint8_t height;
|
||||
char chars[256][256];
|
||||
char name[128];
|
||||
char color[10];
|
||||
char color[32];
|
||||
} FFlogo;
|
||||
|
||||
typedef struct FFstate
|
||||
@@ -36,7 +36,7 @@ typedef struct FFstate
|
||||
//Configuration stuff
|
||||
FFlogo logo;
|
||||
uint16_t logo_seperator;
|
||||
char color[10];
|
||||
char color[32];
|
||||
uint8_t titleLength;
|
||||
bool showErrors;
|
||||
bool recache;
|
||||
|
||||
Reference in New Issue
Block a user