summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_params.c3
-rw-r--r--Src/system.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/Src/Zle/zle_params.c b/Src/Zle/zle_params.c
index 7ea408714..f347e61cf 100644
--- a/Src/Zle/zle_params.c
+++ b/Src/Zle/zle_params.c
@@ -242,8 +242,7 @@ set_lbuffer(UNUSED(Param pm), char *x)
else
y = ZLENULSTR, len = 0;
sizeline(zlell - zlecs + len);
- memmove((char *)(zleline + len), (char *)(zleline + zlecs),
- (zlell - zlecs) * ZLE_CHAR_SIZE);
+ ZS_memmove(zleline + len, zleline + zlecs, zlell - zlecs);
ZS_memcpy(zleline, y, len);
zlell = zlell - zlecs + len;
zlecs = len;
diff --git a/Src/system.h b/Src/system.h
index 1dccabda8..65e681771 100644
--- a/Src/system.h
+++ b/Src/system.h
@@ -727,6 +727,7 @@ typedef wchar_t *ZLE_STRING_T;
#define ZLETAB L'\t'
#define ZLENULSTR L""
#define ZS_memcpy wmemcpy
+#define ZS_memmove wmemmove
#define ZC_icntrl iswcntrl
#else
typedef int ZLE_CHAR_T;
@@ -738,5 +739,6 @@ typedef unsigned char *ZLE_STRING_T;
#define ZLETAB '\t'
#define ZLENULSTR ""
#define ZS_memcpy memcpy
+#define ZS_memmove memmove
#define ZC_icntrl icntrl
#endif