diff options
author | Ian C <ianc@noddybox.co.uk> | 2019-09-18 07:02:31 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2019-09-18 07:02:31 +0000 |
commit | f86e95977b6ccedd64f3094f1099a439eff68020 (patch) | |
tree | c02f9eebb9a6d9fe5d59d10cb10d6b0e59c66253 | |
parent | 0cd93d3952118602e0dfc9ce96c3f26022b26655 (diff) |
Fixed bad memmove()
-rw-r--r-- | insertbom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/insertbom.c b/insertbom.c index ff5833e..7d45fae 100644 --- a/insertbom.c +++ b/insertbom.c @@ -43,7 +43,7 @@ static void Handle(const char *name) { printf("%s: Guessing BE UTF-16\n", name); write = 1; - memmove(buff, buff + 2, len); + memmove(buff + 2, buff, len); buff[0] = 0xfe; buff[1] = 0xff; } @@ -51,7 +51,7 @@ static void Handle(const char *name) { printf("%s: Guessing LE UTF-16\n", name); write = 1; - memmove(buff, buff + 2, len); + memmove(buff + 2, buff, len); buff[0] = 0xff; buff[1] = 0xfe; } |