diff options
Diffstat (limited to 'src/analysis')
-rw-r--r-- | src/analysis/db/collection.c | 2 | ||||
-rw-r--r-- | src/analysis/db/items/bookmark.c | 13 |
2 files changed, 5 insertions, 10 deletions
diff --git a/src/analysis/db/collection.c b/src/analysis/db/collection.c index 57e675b..4c7a496 100644 --- a/src/analysis/db/collection.c +++ b/src/analysis/db/collection.c @@ -652,7 +652,7 @@ static void g_db_collection_set_last_item(GDbCollection *collec, GDbItem *item, else { - if (g_db_item_get_flags(item) & DIF_ERASER) + if ((g_db_item_get_flags(item) & DIF_ERASER) == 0) { g_object_ref(G_OBJECT(item)); g_object_ref(G_OBJECT(item)); diff --git a/src/analysis/db/items/bookmark.c b/src/analysis/db/items/bookmark.c index f493559..2afbbc0 100644 --- a/src/analysis/db/items/bookmark.c +++ b/src/analysis/db/items/bookmark.c @@ -526,7 +526,6 @@ static bool g_db_bookmark_run(GDbBookmark *bookmark, GLoadedBinary *binary, bool GBufferCache *cache; /* Tampon d'impression colorée */ GLineCursor *cursor; /* Emplacement dans un tampon */ size_t index; /* Indice de ligne à traiter */ - GBufferLine *line; /* Ligne de tampon à marquer */ result = false; @@ -544,22 +543,18 @@ static bool g_db_bookmark_run(GDbBookmark *bookmark, GLoadedBinary *binary, bool g_object_unref(G_OBJECT(cursor)); - line = g_buffer_cache_find_line_by_index(cache, index); + index = g_buffer_cache_look_for_flag(cache, index, BLF_HAS_CODE); /* Application du changement */ - result = (line != NULL); + result = (index < g_buffer_cache_count_lines(cache)); if (result) { if (set) - g_buffer_line_add_flag(line, BLF_BOOKMARK); + g_buffer_cache_add_line_flag(cache, index, BLF_BOOKMARK); else - g_buffer_line_remove_flag(line, BLF_BOOKMARK); - - g_object_unref(G_OBJECT(line)); - - g_buffer_cache_throw_update_at_index(cache, index); + g_buffer_cache_remove_line_flag(cache, index, BLF_BOOKMARK); } |