replace memcpy by memmove
authorAndre <maan@p133.(none)>
Mon, 17 Apr 2006 17:16:18 +0000 (19:16 +0200)
committerAndre <maan@p133.(none)>
Mon, 17 Apr 2006 17:16:18 +0000 (19:16 +0200)
as the areas in question may overlap

play.c

diff --git a/play.c b/play.c
index 713a1a6..ad522a9 100644 (file)
--- a/play.c
+++ b/play.c
@@ -263,7 +263,7 @@ again:
                loaded -= ret;
        }
        if (loaded && p != audiobuf)
-               memcpy(audiobuf, p, loaded);
+               memmove(audiobuf, p, loaded);
 read:
        ret = read(STDIN_FILENO, audiobuf + loaded, bufsize - loaded);
        if (ret < 0)