mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-03 07:15:29 -04:00
grid: grid_memset() -> grid_memclear()
This commit is contained in:
parent
abff0e205e
commit
48528419c4
4 changed files with 7 additions and 8 deletions
4
grid.c
4
grid.c
|
|
@ -27,7 +27,7 @@ grid_get_range(struct grid *grid, int start, int *length)
|
|||
}
|
||||
|
||||
void
|
||||
grid_memset(struct grid *grid, int start, int c, int length)
|
||||
grid_memclear(struct grid *grid, int start, int length)
|
||||
{
|
||||
int left = length;
|
||||
while (left > 0) {
|
||||
|
|
@ -37,7 +37,7 @@ grid_memset(struct grid *grid, int start, int c, int length)
|
|||
assert(count > 0);
|
||||
assert(count <= left);
|
||||
|
||||
memset(cells, c, count * sizeof(cells[0]));
|
||||
memset(cells, 0, count * sizeof(cells[0]));
|
||||
|
||||
left -= count;
|
||||
start += count;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue