flash: zero initialize

This commit is contained in:
Flyinghead 2020-12-18 13:44:40 +01:00
parent e94e757743
commit 4ca0b56106
1 changed files with 3 additions and 3 deletions

View File

@ -17,9 +17,9 @@ struct MemChip
MemChip(u32 size, u32 write_protect_size = 0)
{
this->data=new u8[size];
this->size=size;
this->mask=size-1;//must be power of 2
this->data = new u8[size]();
this->size = size;
this->mask = size - 1; // must be power of 2
this->write_protect_size = write_protect_size;
}
virtual ~MemChip() { delete[] data; }