Fix minor compile warnings.

Sync BSTypes in Stella and harmonycart, fixing a bug in the process
(entering non-uppercase extensions for '-bs' would result in an error).
This commit is contained in:
Stephen Anthony 2017-11-10 21:37:11 -03:30
parent a802e934c9
commit c18469c2a3
3 changed files with 11 additions and 4 deletions

View File

@ -444,11 +444,13 @@ bool DebuggerParser::validateArgs(int cmd)
switch(*p)
{
case kARG_DWORD:
#if 0 // TODO - do we need error checking at all here?
if(curArgInt > 0xffffffff)
{
commandResult.str(red("invalid word argument (must be 0-$ffffffff)"));
return false;
}
#endif
break;
case kARG_WORD:

View File

@ -220,7 +220,7 @@ bool PromptWidget::handleKeyDown(StellaKey key, StellaMod mod)
}
}
inputStr[len] = '\0';
int strLen = len - lastDelimPos - 1;
size_t strLen = len - lastDelimPos - 1;
StringList list;
string completionList;

View File

@ -29,6 +29,9 @@ enum class BSType {
_DPC, _DPCP, _E0, _E7, _EF, _EFSC, _F0,
_F4, _F4SC, _F6, _F6SC, _F8, _F8SC, _FA,
_FA2, _FE, _MDM, _SB, _UA, _WD, _X07,
#ifdef CUSTOM_ARM
_CUSTOM,
#endif
NumSchemes
};
@ -88,8 +91,10 @@ static BSDescription BSList[int(BSType::NumSchemes)] = {
{ "SB", "SB (128-256K SUPERbank)" },
{ "UA", "UA (8K UA Ltd.)" },
{ "WD", "WD (Experimental)" },
{ "X07", "X07 (64K AtariAge)" }
{ "X07", "X07 (64K AtariAge)" },
#ifdef CUSTOM_ARM
{ "CUSTOM", "CUSTOM (ARM)" }
#endif
};
class Bankswitch
@ -102,7 +107,7 @@ class Bankswitch
static BSType nameToType(const string& name)
{
for(int i = 0; i < int(BSType::NumSchemes); ++i)
if(BSList[i].name == name)
if(BSPF::equalsIgnoreCase(BSList[i].name, name))
return BSType(i);
return BSType::_AUTO;