mirror of
https://github.com/holub/mame
synced 2025-06-23 21:06:38 +03:00
added assert for index out-of-bounds access with sc4crzgnlm, sc4casrya and others / use const reference (nw)
This commit is contained in:
parent
e440c631ed
commit
48c37e8cff
@ -216,6 +216,7 @@ int find_input_strings(running_machine &machine)
|
|||||||
|
|
||||||
//if (pos <= 5)
|
//if (pos <= 5)
|
||||||
{
|
{
|
||||||
|
assert(pos >= 0 && pos < ARRAY_LENGTH(sc4inputs[port]));
|
||||||
if (sc4inputs[port][pos].used == false)
|
if (sc4inputs[port][pos].used == false)
|
||||||
{
|
{
|
||||||
sc4inputs[port][pos].used = true;
|
sc4inputs[port][pos].used = true;
|
||||||
@ -383,7 +384,7 @@ struct lampinfo
|
|||||||
|
|
||||||
lampinfo lamps[16][16];
|
lampinfo lamps[16][16];
|
||||||
|
|
||||||
void set_clickable_temp(running_machine &machine, astring teststring, int clickport, int clickmask)
|
void set_clickable_temp(running_machine &machine, const astring &teststring, int clickport, int clickmask)
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 16; y++)
|
for (int y = 0; y < 16; y++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user