summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-04 08:35:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-04 08:35:08 +0000
commitd54db9b2a02b1b61899b1c8a0d0128cbd88d4e65 (patch)
tree6d064fa49fe413ac90f6c628706da980c7146c3e /ext
parentdc3ea52e1c0f9b673ef45f96c42bf393c24890e8 (diff)
_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
Diffstat (limited to 'ext')
-rw-r--r--ext/sdbm/_sdbm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index a170561..b9ee6c3 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;