summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-22 16:32:37 -0400
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-05-22 16:32:37 -0400
commit2853ea6781855edb3d298710a14ce2161fc98c1a (patch)
treeb7cd7cf05cc10887cc588a27b3b986c0d0a552da
parent384d04c119b6a4e7731e66699be4ec2b3c78f165 (diff)
handle EOF in strings
-rw-r--r--json.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/json.sh b/json.sh
index dd24358..1bdc908 100644
--- a/json.sh
+++ b/json.sh
@@ -183,6 +183,9 @@ _json_string() {
"$_json_token" "$1" "$_json_strval"
return
;;
+ '' )
+ _json_error 'unexpected EOF in string'
+ ;;
* )
# Consume multiple characters at once,
# or else this is horribly slow.