while(isspace(str[beginIndex])){
++beginIndex;
}
- if(str[beginIndex] == '\0')
+ if(str[beginIndex] == '\0') {
break;
- endIndex = beginIndex;
+ }
+ endIndex = beginIndex;
while (str[endIndex] && !isspace(str[endIndex])){
++endIndex;
}
int ibperhx = 8, obperhx = 8;
int rflags = 0; // search flags
int c;
- unsigned long width = 0UL;
+ //unsigned long width;
poly_t apoly, crc;
char *string;
return uerr("no preset models available");
// must set width so that parameter to -ipx is not zeroed
- width = plen(model.spoly);
+ //width = plen(model.spoly);
rflags |= R_HAVEP | R_HAVEI | R_HAVERI | R_HAVERO | R_HAVEX;
//set flags
if (ans) {
//test for match
if (memcmp(result, inCRC, crcChars)==0){
- PrintAndLog("\nFound a match!\nModel: %s\nValue: %s\n",Models[i], result);
+ PrintAndLog("\nFound a possible match!\nModel: %s\nValue: %s\n",Models[i], result);
//optional - stop searching if found...
found = true;
} else {
if (crcChars > 2){
char *swapEndian = SwapEndianStr(result, crcChars, crcChars);
if (memcmp(swapEndian, inCRC, crcChars)==0){
- PrintAndLog("\nFound a match!\nModel: %s\nValue EndianSwapped: %s\n",Models[i], swapEndian);
+ PrintAndLog("\nFound a possible match!\nModel: %s\nValue EndianSwapped: %s\n",Models[i], swapEndian);
//optional - stop searching if found...
found = true;
}
if (ans) {
//test for match
if (memcmp(revResult, inCRC, crcChars)==0){
- PrintAndLog("\nFound a match!\nModel Reversed: %s\nValue: %s\n",Models[i], revResult);
+ PrintAndLog("\nFound a possible match!\nModel Reversed: %s\nValue: %s\n",Models[i], revResult);
//optional - stop searching if found...
found = true;
} else {
if (crcChars > 2){
char *swapEndian = SwapEndianStr(revResult, crcChars, crcChars);
if (memcmp(swapEndian, inCRC, crcChars)==0){
- PrintAndLog("\nFound a match!\nModel Reversed: %s\nValue EndianSwapped: %s\n",Models[i], swapEndian);
+ PrintAndLog("\nFound a possible match!\nModel Reversed: %s\nValue EndianSwapped: %s\n",Models[i], swapEndian);
//optional - stop searching if found...
found = true;
}