diff --git a/source/picasso_assembler.cpp b/source/picasso_assembler.cpp index ab72fda..00fbc4c 100644 --- a/source/picasso_assembler.cpp +++ b/source/picasso_assembler.cpp @@ -716,7 +716,7 @@ static int parseReg(char* pos, int& outReg, int& outSw, int* idxType = NULL) char* idxRegName = trim_whitespace(offPos); offPos = trim_whitespace(plusPos); *idxType = convertIdxRegName(idxRegName); - if (*idxType < 0) + if (!*idxType) return throwError("invalid index register: %s\n", idxRegName); } while (0);