Fixed a bug in array size check.

This commit is contained in:
stormdragon2976 2022-12-06 01:15:23 -05:00
parent c373f2d0e5
commit 1ab8e8620a

View File

@ -194,7 +194,7 @@ for x in "${voiceListFullName[@]}" ; do
done done
oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')" oldVoice="$($grep -P '"DefaultTokenId"="HKEY_LOCAL_MACHINE\\\\(SOFTWARE|Software)\\\\(Wow6432Node\\\\|)Microsoft\\\\Speech\\\\Voices\\\\Token(Enum|)s\\\\[^"]+"' "${WINEPREFIX}/user.reg" | $sed -E -e 's/"DefaultTokenId"="([^"]+)"/\1/g')"
exit=1 exit=1
if [[ "${voiceList[@]}" -eq 0 ]]; then if [[ "${#voiceList[@]}" -eq 0 ]]; then
dialog --msgbox "No voices found." -1 -1 dialog --msgbox "No voices found." -1 -1
exit 1 exit 1
fi fi