fix case problem with bash JsonDecode

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-04-15 10:55:22 +02:00
parent 10415846d9
commit 6be706b571
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
#### $$VERSION$$ v0.6-rc1-0-gc001d14
#### $$VERSION$$ v0.6-rc1-2-g1041584
#
# Exit Codes:
# - 0 sucess (hopefully)
@ -592,7 +592,7 @@ else
JsonDecode() {
local out="$1"
local remain=""
local regexp='(.*)\\ud([0-9a-fA-F]{3})\\ud([0-9a-fA-F]{3})(.*)'
local regexp='(.*)\\u[dD]([0-9a-fA-F]{3})\\u[dD]([0-9a-fA-F]{3})(.*)'
while [[ "${out}" =~ $regexp ]] ; do
local W1="$(( ( 0xd${BASH_REMATCH[2]} & 0x3ff) <<10 ))"
local W2="$(( 0xd${BASH_REMATCH[3]} & 0x3ff ))"