Add proper handling of hex data

This commit is contained in:
Azim Khan 2017-05-31 20:29:36 +01:00 committed by Mohammad Azim Khan
parent f1aaec9888
commit 184447e7e4

View File

@ -274,9 +274,22 @@ static int convert_params( size_t cnt , char ** params , int * int_params_store
}
else if ( strcmp( type, "hex" ) == 0 )
{
*int_params_store = unhexify( (unsigned char *) val, val );
*out++ = (char *)int_params_store++;
*out++ = val;
if ( verify_string( &val ) == 0 )
{
int j;
*int_params_store = unhexify( (unsigned char *) val, val );
printf ("\n");
for (j = 0; j < *int_params_store; j++)
printf ("%02x ", (uint8_t)val[j]);
printf ("\n len %d\n", *int_params_store);
*out++ = val;
*out++ = (char *)(int_params_store++);
}
else
{
ret = ( DISPATCH_INVALID_TEST_DATA );
break;
}
}
else if ( strcmp( type, "exp" ) == 0 )
{