mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 17:17:09 -04:00
fix last commit not properly reloading changed options from disc, whoops
This commit is contained in:
parent
278e7c70cd
commit
669dac1738
@ -134,12 +134,14 @@ static cc_bool Options_LoadFilter(const String* entry) {
|
||||
}
|
||||
|
||||
void Options_Load(void) {
|
||||
static cc_bool loaded;
|
||||
String entry, key, value;
|
||||
int i;
|
||||
|
||||
if (!Options.path) {
|
||||
if (!loaded) {
|
||||
EntryList_Init(&Options, "options-default.txt", '=');
|
||||
EntryList_Init(&Options, "options.txt", '=');
|
||||
loaded = true;
|
||||
} else {
|
||||
/* Reset all the unchanged options */
|
||||
for (i = Options.entries.count - 1; i >= 0; i--) {
|
||||
|
@ -256,7 +256,7 @@ void EntryList_Load(struct EntryList* list, const char* file, EntryList_Filter f
|
||||
/* If don't prevent this here, client aborts in StringsBuffer_Add */
|
||||
if (entry.length > STRINGSBUFFER_LEN_MASK) {
|
||||
entry.length = 0;
|
||||
String_Format1(&entry, "Skipping extremely long line in %c, file may have been corrupted", list->path);
|
||||
String_Format1(&entry, "Skipping extremely long line in %c, file may have been corrupted", file);
|
||||
Logger_WarnFunc(&entry); continue;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,6 @@ int Convert_ToBase64(const cc_uint8* src, int len, char* dst);
|
||||
int Convert_FromBase64(const char* src, int len, cc_uint8* dst);
|
||||
|
||||
struct EntryList {
|
||||
const char* path;
|
||||
char separator;
|
||||
struct StringsBuffer entries;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user