diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2016-05-30 21:35:38 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2016-05-30 21:35:38 (GMT) |
commit | 29aad9fe1113f6b5586e86aa4cc9d7d25c23d361 (patch) | |
tree | 9cbfbd8f3fd1a6f7b44eb50a6d14695f02ce5756 | |
parent | 36760a757f4c3cdecd04d678a41d3484dcdac566 (diff) |
Avoided errors on project saving.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/analysis/binary.c | 27 |
2 files changed, 23 insertions, 9 deletions
@@ -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; } |