From d54db9b2a02b1b61899b1c8a0d0128cbd88d4e65 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 4 Feb 2015 08:35:08 +0000 Subject: [PATCH] _sdbm.c: fix pointers to shift * ext/sdbm/_sdbm.c (delpair): dst and src point at the ends of each data, whereas memmove requires pointers to the beginnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/sdbm/_sdbm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c index a1705613a9..b9ee6c3972 100644 --- a/ext/sdbm/_sdbm.c +++ b/ext/sdbm/_sdbm.c @@ -802,7 +802,7 @@ delpair(char *pag, datum key) } #else #ifdef MEMMOVE - memmove(dst, src, m); + memmove(dst-m, src-m, m); #else while (m--) *--dst = *--src;