From 0b429e06b8c4b66a9f7fe89b5504315ab4f69616 Mon Sep 17 00:00:00 2001 From: Aldrik Ramaekers Date: Fri, 8 Mar 2024 20:48:05 +0100 Subject: linux building --- src/config.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/config.cpp') diff --git a/src/config.cpp b/src/config.cpp index 4813c5c..216c93d 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -3,6 +3,8 @@ #include "search.h" #include +#include +#include utf8_int8_t path_buffer[MAX_INPUT_LENGTH]; utf8_int8_t filter_buffer[MAX_INPUT_LENGTH]; @@ -19,9 +21,9 @@ static void _ts_config_ReadLine(ImGuiContext*, ImGuiSettingsHandler*, void* entr int threads, maxSize; - if (sscanf(line, "Path=%s", &path) == 1) { strcpy_s(path_buffer, MAX_INPUT_LENGTH, (char*)path); } - else if (sscanf(line, "Filter=%s", &filter) == 1) { strcpy_s(filter_buffer, MAX_INPUT_LENGTH, (char*)filter); } - else if (sscanf(line, "Query=%s", &query) == 1) { strcpy_s(query_buffer, MAX_INPUT_LENGTH, (char*)query); } + if (sscanf(line, "Path=%s", &path) == 1) { strcpy(path_buffer, (char*)path); } + else if (sscanf(line, "Filter=%s", &filter) == 1) { strcpy(filter_buffer, (char*)filter); } + else if (sscanf(line, "Query=%s", &query) == 1) { strcpy(query_buffer, (char*)query); } else if (sscanf(line, "Threads=%d", &threads) == 1) { ts_thread_count = threads; } else if (sscanf(line, "MaxSize=%d", &maxSize) == 1) { max_file_size = maxSize; } } -- cgit v1.2.3-70-g09d2