Fix several codeql warns

This commit is contained in:
Jasmine Iwanek
2025-07-27 20:59:55 -04:00
parent f4d3924c8c
commit 6d6d5931bf
9 changed files with 17 additions and 17 deletions

View File

@@ -840,7 +840,7 @@ recalc_sltptr(scamp_t *dev)
recalc_ems(dev);
}
} else {
for (uint8_t i = 0; i < (sltptr / EMS_PGSIZE); i++)
for (uint32_t i = 0; i < (sltptr / EMS_PGSIZE); i++)
scamp_mem_update_state(dev, i * EMS_PGSIZE, EMS_PGSIZE, 0x00, MEM_FMASK_SLOTBUS);
for (uint8_t i = (sltptr / EMS_PGSIZE); i < 40; i++)

View File

@@ -841,7 +841,7 @@ wd76c10_pf_loc_recalc(wd76c10_t *dev)
uint8_t ems_page;
uint32_t base;
for (uint8_t i = (0x031 + pf_loc); i <= (0x037 + pf_loc); i++) {
for (uint16_t i = (0x031 + pf_loc); i <= (0x037 + pf_loc); i++) {
ems_page = (i - 0x10) & 0xf7;
dev->mem_pages[i] = ems_page;
base = ((uint32_t) i) << 14;