fix: TRUE/FALSE -> bools

fix: 'iclass'  filepath 255, to use FILE_PATH_SIZE
fix: unified params test
This commit is contained in:
iceman1001 2017-07-14 20:54:11 +02:00
commit e8015142cd
15 changed files with 129 additions and 176 deletions

View file

@ -47,7 +47,7 @@ int GetWiegandFromPresco(const char *Cmd, uint32_t *sitecode, uint32_t *usercode
int stringlen = 0;
memset(id, 0x00, sizeof(id));
while(param_getchar(Cmd, cmdp) != 0x00) {
while(param_getchar(Cmd, cmdp) != 0x00 && !errors) {
switch(param_getchar(Cmd, cmdp)) {
case 'h':
return -1;
@ -74,13 +74,9 @@ int GetWiegandFromPresco(const char *Cmd, uint32_t *sitecode, uint32_t *usercode
errors = 1;
break;
}
if(errors) break;
}
// No args
if(cmdp == 0) errors = 1;
//Validations
if(errors) return -1;
if (errors || cmdp == 0) return -1;
if (!hex) {
for (int index =0; index < strlen(id); ++index) {