summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-16 11:04:45 +0000
committertron <tron@openttd.org>2005-01-16 11:04:45 +0000
commitefecea001a6296728134a0605245ef412c46eae9 (patch)
tree6bfae25529ddd3c533994d7fbb03a6461e751487
parent1955371a714152a37d698f4c60b731f3e1edcaf5 (diff)
downloadopenttd-efecea001a6296728134a0605245ef412c46eae9.tar.xz
(svn r1534) Use memmove() instead of memcpy() when copying overlapping memory (tamlin)
-rw-r--r--window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/window.c b/window.c
index 9b18ee671..8e55c1c87 100644
--- a/window.c
+++ b/window.c
@@ -240,7 +240,7 @@ void DeleteWindow(Window *w)
v = --_last_window;
count = (byte*)v - (byte*)w;
- memcpy(w, w + 1, count);
+ memmove(w, w + 1, count);
}
Window *FindWindowById(WindowClass cls, WindowNumber number)