summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/analysis/binary.c27
2 files changed, 23 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index c448c35..a94e7c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
16-05-30 Cyrille Bagard <nocbos@gmail.com>
+ * src/analysis/binary.c:
+ Avoid errors on project saving.
+
+16-05-30 Cyrille Bagard <nocbos@gmail.com>
+
* plugins/pychrysa/format/format.c:
* src/analysis/disass/links.c:
* src/analysis/disass/links.h:
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index 8957399..20410f2 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -207,9 +207,10 @@ static void g_loaded_binary_init(GLoadedBinary *binary)
binary->remote_host = strdup("localhost");
binary->remote_port = 1337;
+ binary->storages[DBF_BOOKMARKS] = DBS_ALL_LOCAL;
binary->storages[DBF_COMMENTS] = DBS_ALL_LOCAL;
+ binary->storages[DBF_MOVES] = DBS_ALL_LOCAL;
binary->storages[DBF_DISPLAY_SWITCHERS] = DBS_ALL_LOCAL;
- binary->storages[DBF_BOOKMARKS] = DBS_ALL_LOCAL;
binary->collections = create_collections_list();
attach_binary_to_collections(binary->collections, binary);
@@ -684,17 +685,21 @@ static bool g_loaded_binary_load_storage(GLoadedBinary *binary, xmlXPathContextP
switch (i)
{
+ case DBF_BOOKMARKS:
+ access = stradd(access, "Bookmarks");
+ break;
case DBF_COMMENTS:
access = stradd(access, "Comments");
break;
+ case DBF_MOVES:
+ access = stradd(access, "Moves");
+ break;
case DBF_DISPLAY_SWITCHERS:
access = stradd(access, "Segments");
break;
- case DBF_BOOKMARKS:
- access = stradd(access, "Bookmarks");
- break;
- case DBF_COUNT:
+ default:
/* Pour GCC */
+ assert(false);
break;
}
@@ -781,17 +786,21 @@ static bool g_loaded_binary_save_storage(const GLoadedBinary *binary, xmlDocPtr
switch (i)
{
+ case DBF_BOOKMARKS:
+ access = stradd(access, "Bookmarks");
+ break;
case DBF_COMMENTS:
access = stradd(access, "Comments");
break;
+ case DBF_MOVES:
+ access = stradd(access, "Moves");
+ break;
case DBF_DISPLAY_SWITCHERS:
access = stradd(access, "Segments");
break;
- case DBF_BOOKMARKS:
- access = stradd(access, "Bookmarks");
- break;
- case DBF_COUNT:
+ default:
/* Pour GCC */
+ assert(false);
break;
}