1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From 9da261c6d9a3f276e44c7f1999aef4fc758cbafd Mon Sep 17 00:00:00 2001
From: Rob Loach <robloach@gmail.com>
Date: Mon, 3 Sep 2018 13:31:46 -0400
Subject: [PATCH] Update config entries pointer to the new beginning of the
list after sorting
---
libretro-common/file/config_file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libretro-common/file/config_file.c b/libretro-common/file/config_file.c
index 9c2b76b170..0a63e7781a 100644
--- a/libretro-common/file/config_file.c
+++ b/libretro-common/file/config_file.c
@@ -999,6 +999,7 @@ void config_file_dump(config_file_t *conf, FILE *file)
}
list = merge_sort_linked_list((struct config_entry_list*)conf->entries, config_sort_compare_func);
+ conf->entries = list;
while (list)
{
@@ -1092,7 +1093,7 @@ static void test_config_file(void)
test_config_file_parse_contains("foo = \"bar\"", "foo", "bar");
#if 0
- /* turns out it treats empty as nonexistent -
+ /* turns out it treats empty as nonexistent -
* should probably be fixed */
test_config_file_parse_contains("foo = \"\"\n", "foo", "");
test_config_file_parse_contains("foo = \"\"", "foo", "");
|