_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
This commit is contained in:
parent
dc3ea52e1c
commit
d54db9b2a0
@ -802,7 +802,7 @@ delpair(char *pag, datum key)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#ifdef MEMMOVE
|
#ifdef MEMMOVE
|
||||||
memmove(dst, src, m);
|
memmove(dst-m, src-m, m);
|
||||||
#else
|
#else
|
||||||
while (m--)
|
while (m--)
|
||||||
*--dst = *--src;
|
*--dst = *--src;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user