memcpy -> memmove
This commit is contained in:
parent
0461199e64
commit
9ae4abbb56
@ -314,7 +314,7 @@ struct k3MLabel *k3MLabel(struct k3Font *font, float sz, const char *txt) {
|
|||||||
int k3MRemoveChild(struct k3MObj *parent, struct k3MObj *child) {
|
int k3MRemoveChild(struct k3MObj *parent, struct k3MObj *child) {
|
||||||
for(size_t i = 0; i < parent->childCount; i++) {
|
for(size_t i = 0; i < parent->childCount; i++) {
|
||||||
if(parent->children[i] == child) {
|
if(parent->children[i] == child) {
|
||||||
memcpy(&parent->children[i], &parent->children[i + 1], sizeof(*parent->children) * (parent->childCount - i - 1));
|
memmove(&parent->children[i], &parent->children[i + 1], sizeof(*parent->children) * (parent->childCount - i - 1));
|
||||||
|
|
||||||
parent->childCount--;
|
parent->childCount--;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user