find the 'I' of immediate even if it's not the last character

This commit is contained in:
Romain Dolbeau 2021-02-08 05:49:14 -05:00
parent e70c7fc26b
commit 88ecadf02c

View file

@ -50,10 +50,12 @@ public:
}
bool isImm(void) const {
int indice = name.length()-1;
if (isWord())
return name[name.length()-2] == 'I';
else
return name[name.length()-1] == 'I';
indice --;
while ((indice > 0) && (name[indice] >= '0') && (name[indice] <= '9'))
indice --;
return name[indice] == 'I';
}
std::string ctrlName() const {