summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-01-10 13:55:03 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-01-10 13:55:03 (GMT)
commit585a2f345be7f58a6811f0eceda8c2b39e103deb (patch)
tree09f7cc7f776253ba949cc83e9488f59acb49f39f /src
parent239694d99ad81f1e435125e76a2a930213d06b21 (diff)
Fixed a bug when the replacing string contains the replaced pattern.
Diffstat (limited to 'src')
-rw-r--r--src/common/extstr.c2
-rw-r--r--src/format/format.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/src/common/extstr.c b/src/common/extstr.c
index 59d4389..9986ec1 100644
--- a/src/common/extstr.c
+++ b/src/common/extstr.c
@@ -209,6 +209,8 @@ char *strrpl(char *haystack, const char *needle1, const char *needle2)
memcpy(found, needle2, len2);
+ index += len2;
+
}
return haystack;
diff --git a/src/format/format.c b/src/format/format.c
index dd70281..8395c6e 100644
--- a/src/format/format.c
+++ b/src/format/format.c
@@ -232,8 +232,10 @@ void g_binary_format_setup_disassembling_context(const GBinFormat *format, GProc
void _g_binary_format_add_symbol(GBinFormat *format, GBinSymbol *symbol, bool sort)
{
+#ifndef NDEBUG
const mrange_t *range; /* Couverture du symbole */
const vmpa2t *addr; /* Emplacement du symbole */
+#endif
/**
* Lorsque les fonctions de recherche type g_binary_format_find_symbol_at()