mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r1534) Use memmove() instead of memcpy() when copying overlapping memory (tamlin)
This commit is contained in:
parent
1955371a71
commit
efecea001a
2
window.c
2
window.c
@ -240,7 +240,7 @@ void DeleteWindow(Window *w)
|
|||||||
|
|
||||||
v = --_last_window;
|
v = --_last_window;
|
||||||
count = (byte*)v - (byte*)w;
|
count = (byte*)v - (byte*)w;
|
||||||
memcpy(w, w + 1, count);
|
memmove(w, w + 1, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
Window *FindWindowById(WindowClass cls, WindowNumber number)
|
Window *FindWindowById(WindowClass cls, WindowNumber number)
|
||||||
|
Loading…
Reference in New Issue
Block a user