diff options
| author | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-08 20:48:05 +0100 |
|---|---|---|
| committer | Aldrik Ramaekers <aldrikboy@gmail.com> | 2024-03-08 20:48:05 +0100 |
| commit | 0b429e06b8c4b66a9f7fe89b5504315ab4f69616 (patch) | |
| tree | d5cf9d15d8790559f0c4b006ede0ca1314639077 /src/config.cpp | |
| parent | def620a66bc5b0dc1107102f2c234888dc9bd830 (diff) | |
linux building
Diffstat (limited to 'src/config.cpp')
| -rw-r--r-- | src/config.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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 <stdio.h> +#include <string.h> +#include <cstring> 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; } } |
