diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 21:50:09 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-10-26 21:50:09 +0100 |
| commit | 6d5485b97cd46f81512e9198ac7c59c7ba1d9247 (patch) | |
| tree | 3c931ba16f545cfaf610e56d3d66af2a9b1146ae /ot_stats.c | |
| parent | 62ae3df3f3ee7b82a539391b0b3ce17ac3cee4ce (diff) | |
Potentially overlapping areas need memmove, not memcpy
Diffstat (limited to 'ot_stats.c')
| -rw-r--r-- | ot_stats.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -175,8 +175,8 @@ static size_t stats_get_highscore_networks(stats_network_node *node, int depth, | |||
| 175 | ++j; | 175 | ++j; |
| 176 | --j; | 176 | --j; |
| 177 | 177 | ||
| 178 | memcpy(scores, scores + 1, j * sizeof(*scores)); | 178 | memmove(scores, scores + 1, j * sizeof(*scores)); |
| 179 | memcpy(networks, networks + 1, j * sizeof(*networks)); | 179 | memmove(networks, networks + 1, j * sizeof(*networks)); |
| 180 | scores[j] = node_score; | 180 | scores[j] = node_score; |
| 181 | memcpy(networks + j, node_value, sizeof(*networks)); | 181 | memcpy(networks + j, node_value, sizeof(*networks)); |
| 182 | } | 182 | } |
