mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 17:29:50 +00:00
Fixed a bug
git-svn-id: svn://svn.cc65.org/cc65/trunk@2250 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
e829fe0ee2
commit
b1f89ab793
@ -887,7 +887,14 @@ int FindInstruction (const char* Ident)
|
||||
|
||||
/* Make a copy, and uppercase that copy */
|
||||
I = 0;
|
||||
while (Ident[I]) {
|
||||
while (Ident[I] != '\0') {
|
||||
/* If the identifier is longer than the longest mnemonic, it cannot
|
||||
* be one.
|
||||
*/
|
||||
if (I >= sizeof (Key) - 1) {
|
||||
/* Not found, no need for further action */
|
||||
return -1;
|
||||
}
|
||||
Key[I] = toupper ((unsigned char)Ident[I]);
|
||||
++I;
|
||||
}
|
||||
|
@ -97,7 +97,7 @@
|
||||
/* Description for one instruction */
|
||||
typedef struct InsDesc InsDesc;
|
||||
struct InsDesc {
|
||||
char Mnemonic [8];
|
||||
char Mnemonic[5];
|
||||
unsigned long AddrMode; /* Valid adressing modes */
|
||||
unsigned char BaseCode; /* Base opcode */
|
||||
unsigned char ExtCode; /* Number of ext code table */
|
||||
|
Loading…
Reference in New Issue
Block a user