about summary refs log tree commit homepage
path: root/ext/mwrap/mwrap.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/mwrap/mwrap.c')
-rw-r--r--ext/mwrap/mwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/mwrap/mwrap.c b/ext/mwrap/mwrap.c
index 421c086..0a1f9b5 100644
--- a/ext/mwrap/mwrap.c
+++ b/ext/mwrap/mwrap.c
@@ -839,7 +839,7 @@ extract_addr(const char *str, size_t len, void **p)
 {
         const char *c;
 #if defined(__GLIBC__)
-        return ((c = memchr(str, '[', len)) && sscanf(c, "[%p]", p));
+        return ((c = memrchr(str, '[', len)) && sscanf(c, "[%p]", p));
 #else /* tested FreeBSD */
         return ((c = strstr(str, "0x")) && sscanf(c, "%p", p));
 #endif