HIDdata commandline with error any OS?
Posted: Wed Nov 05, 2008 12:18 am
I have testet and no luck with it, than i searched in the Code and than that!
buffer[pos++] = (char)strtol(s, NULL, 0);
will it ever give 0 in the buffer?!
Code: Select all
static int hexread(char *buffer, char *string, int buflen)
{
char *s;
int pos = 0;
while((s = strtok(string, ", ")) != NULL && pos < buflen){
string = NULL;
buffer[pos++] = (char)strtol(s, NULL, 0);
}
return pos;
}
buffer[pos++] = (char)strtol(s, NULL, 0);
will it ever give 0 in the buffer?!