NaruseMioShirakana / DragonianVoice

多个SVC/TTS的C++推理库
GNU Affero General Public License v3.0
985 stars 119 forks source link

vector下标越界 #41

Closed zhqnbq closed 1 year ago

zhqnbq commented 1 year ago

如果models文件夹下没有任何一个可读取的json文件,models列表为空,此时读取_models[] vector的时候因为数组内为空,_models[index_model]/_models[0]/下标越界 解决方案:使用if语句先判断获取的下标位置是否合法,不合法直接return