@@ -17,9 +17,9 @@ static esp_err_t console_set_handler(int argc, char **argv)
1717{
1818 VerifyOrReturnError (argc >= 4 , ESP_ERR_INVALID_ARG , ESP_LOGE (TAG , " The arguments for this command is invalid" ));
1919
20- uint16_t endpoint_id = strtoul (( const char *)& argv[0 ][ 2 ] , NULL , 16 );
21- uint32_t cluster_id = strtoul (( const char *)& argv[1 ][ 2 ] , NULL , 16 );
22- uint32_t attribute_id = strtoul (( const char *)& argv[2 ][ 2 ] , NULL , 16 );
20+ uint16_t endpoint_id = strtoul (argv[0 ], NULL , 0 );
21+ uint32_t cluster_id = strtoul (argv[1 ], NULL , 0 );
22+ uint32_t attribute_id = strtoul (argv[2 ], NULL , 0 );
2323
2424 attribute_t *attr = attribute::get (endpoint_id, cluster_id, attribute_id);
2525 if (!attr) {
@@ -158,9 +158,9 @@ static esp_err_t console_set_handler(int argc, char **argv)
158158static esp_err_t console_get_handler (int argc, char **argv)
159159{
160160 VerifyOrReturnError (argc >= 3 , ESP_ERR_INVALID_ARG , ESP_LOGE (TAG , " The arguments for this command is invalid" ));
161- uint16_t endpoint_id = strtoul (( const char *)& argv[0 ][ 2 ] , NULL , 16 );
162- uint32_t cluster_id = strtoul (( const char *)& argv[1 ][ 2 ] , NULL , 16 );
163- uint32_t attribute_id = strtoul (( const char *)& argv[2 ][ 2 ] , NULL , 16 );
161+ uint16_t endpoint_id = strtoul (argv[0 ], NULL , 0 );
162+ uint32_t cluster_id = strtoul (argv[1 ], NULL , 0 );
163+ uint32_t attribute_id = strtoul (argv[2 ], NULL , 0 );
164164
165165 attribute_t *attr = attribute::get (endpoint_id, cluster_id, attribute_id);
166166 if (!attr) {
0 commit comments