ops: use ARRAY_SIZE macro for opchars array length

This commit is contained in:
Jan Edmund Lazo 2019-04-10 22:09:57 -04:00
parent d8d4f05564
commit 5cf96fc141

View File

@ -153,7 +153,7 @@ int get_op_type(int char1, int char2)
if (opchars[i][0] == char1 && opchars[i][1] == char2) {
break;
}
if (i == (int)(sizeof(opchars) / sizeof(char [3]) - 1)) {
if (i == (int)(ARRAY_SIZE(opchars) - 1)) {
internal_error("get_op_type()");
break;
}