diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-13 01:49:57 +0200 |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-13 01:49:57 +0200 |
commit | fda7a8ce78cdc46c6728ad9cd82c4b3eccd0dd92 (patch) | |
tree | a47ff8b56cf3a15d4056da86ac92bda314514be4 /Lib/json/decoder.py | |
parent | 981c3bde8de59bd516f26e435d01788df3d5de56 (diff) | |
download | cpython-git-fda7a8ce78cdc46c6728ad9cd82c4b3eccd0dd92.tar.gz |
#17368: Fix an off-by-one error in the Python JSON decoder that caused a failure while decoding empty object literals when object_pairs_hook was specified.
Diffstat (limited to 'Lib/json/decoder.py')
-rw-r--r-- | Lib/json/decoder.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/json/decoder.py b/Lib/json/decoder.py index dc8916c926..dfcc6284a2 100644 --- a/Lib/json/decoder.py +++ b/Lib/json/decoder.py @@ -163,7 +163,7 @@ def JSONObject(s_and_end, encoding, strict, scan_once, object_hook, if nextchar == '}': if object_pairs_hook is not None: result = object_pairs_hook(pairs) - return result, end + return result, end + 1 pairs = {} if object_hook is not None: pairs = object_hook(pairs) |