Hi
mch_memmove is typically a #define which
directly calls memmove(dest, src, len).
But I noticed that in misc2.c, there is an
implementation for systems that don't
have memmove(). That implementation is
wrong! It has its parameters in the wrong
order. Vim would crash if it was used.
We could fix it as in attached patch, but
I think that this implementation is actually never
used anyway and should be removed.
We could thus replace all mch_memmove() by
memmove(). memmove() is part of C89. Can't
we just assume that it's available on all platforms
where vim is built?
Regards
Dominique
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.
diff --git a/src/misc2.c b/src/misc2.c
index 26d5970..b5dfe25 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1747,7 +1747,7 @@ vim_memset(void *ptr, int c, size_t size)
* For systems that don't have a function that is guaranteed to do that (SYSV).
*/
void
-mch_memmove(void *src_arg, void *dst_arg, size_t len)
+mch_memmove(void *dst_arg, void *src_arg, size_t len)
{
/*
* A void doesn't have a size, we use char pointers.