Add missing memory width assert preventing division by zero (#3546)

This commit is contained in:
Emil J 2022-11-09 10:34:25 +01:00 committed by GitHub
parent faa1c2e7fe
commit c75f12a989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -504,6 +504,7 @@ void Mem::check() {
int mask = (1 << max_wide_log2) - 1;
log_assert(!(start_offset & mask));
log_assert(!(size & mask));
log_assert(width != 0);
}
namespace {