esp-adf icon indicating copy to clipboard operation
esp-adf copied to clipboard

tone_partition 中 tone_partition_get_file_info 判断有误 (AUD-6137)

Open tobraver opened this issue 9 months ago • 1 comments

esp_err_t tone_partition_get_file_info(tone_partition_handle_t handle, uint16_t index, tone_file_info_t *info)
{
    AUDIO_NULL_CHECK(TAG, handle, return ESP_FAIL);
    AUDIO_NULL_CHECK(TAG, info, return ESP_FAIL);

    if (handle->header.total_num < index) {
        ESP_LOGE(TAG, "Wanted index out of range index[%d]", index);
        return ESP_FAIL;
    }
........

问题:index 的值为 0 ~ total_num-1,如果 index = total_num,此判断逻辑就有问题。

tobraver avatar Mar 05 '25 03:03 tobraver

esp-idf v5.3.2适用此更改

suicideking000 avatar Apr 23 '25 08:04 suicideking000