comparison simtool/writecmd.c @ 150:54e33e9238b6

fc-simtool: harmonize hex string code with fc-uicc-tool
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 07 Feb 2021 00:06:50 +0000
parents 4aaf722ab933
children d515cfbb3f39
comparison
equal deleted inserted replaced
149:451ed3bbfe96 150:54e33e9238b6
34 offset = strtoul(argv[1], 0, 0); 34 offset = strtoul(argv[1], 0, 0);
35 if (offset > 0xFFFF) { 35 if (offset > 0xFFFF) {
36 fprintf(stderr, "error: offset argument is out of range\n"); 36 fprintf(stderr, "error: offset argument is out of range\n");
37 return(-1); 37 return(-1);
38 } 38 }
39 rc = decode_hex_data_from_string(argv[2], data); 39 rc = decode_hex_data_from_string(argv[2], data, 255);
40 if (rc < 0) 40 if (rc < 0)
41 return(rc); 41 return(rc);
42 len = rc; 42 len = rc;
43 return update_bin_op(offset, data, len); 43 return update_bin_op(offset, data, len);
44 } 44 }