summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/analysis/db/items/comment.c2
-rw-r--r--src/glibext/gbinportion.c2
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 7599fa5..82d5060 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+17-01-15 Cyrille Bagard <nocbos@gmail.com>
+
+ * src/analysis/db/items/comment.c:
+ Match the perfect line index.
+
+ * src/glibext/gbinportion.c:
+ Fix a bug about pure comments containing code.
+
17-01-14 Cyrille Bagard <nocbos@gmail.com>
* src/arch/vmpa.c:
diff --git a/src/analysis/db/items/comment.c b/src/analysis/db/items/comment.c
index 936e2ac..c021e44 100644
--- a/src/analysis/db/items/comment.c
+++ b/src/analysis/db/items/comment.c
@@ -658,6 +658,8 @@ static bool g_db_comment_run(GDbComment *comment, GLoadedBinary *binary, bool ap
linked = g_buffer_cache_find_index_by_addr(cache, get_mrange_addr(range), true);
assert(linked != g_buffer_cache_count_lines(cache));
+ linked = g_buffer_cache_look_for_flag(cache, linked, BLF_HAS_CODE | BLF_IS_LABEL);
+
RUN_INLINED_COMMENT(linked, comment, comment->old_inlined[i]);
}
diff --git a/src/glibext/gbinportion.c b/src/glibext/gbinportion.c
index e5dedd6..a28f1a7 100644
--- a/src/glibext/gbinportion.c
+++ b/src/glibext/gbinportion.c
@@ -869,7 +869,7 @@ static int g_binary_portion_contains_addr(const GBinPortion *portion, const vmpa
static BufferLineFlags g_binary_portion_get_flags(const GBinPortion *portion, size_t index, size_t repeat)
{
- return (repeat == 0 ? BLF_WIDTH_MANAGER : BLF_HAS_CODE);
+ return (repeat == 0 ? BLF_WIDTH_MANAGER : BLF_NONE);
}