From 73a9ada9a4e70047bd5e15813506af396338d5f7 Mon Sep 17 00:00:00 2001 From: Sebastian Pfitzner Date: Mon, 4 Mar 2024 13:27:53 +0100 Subject: [PATCH 1/2] fix: proper type promotion for ESCAPED_ARRAY indexing --- src/Writer.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Writer.jl b/src/Writer.jl index 5c4cc63..755a358 100644 --- a/src/Writer.jl +++ b/src/Writer.jl @@ -121,7 +121,7 @@ const SC = StructuralContext # Low-level direct access Base.write(io::JSONContext, byte::UInt8) = write(io.io, byte) Base.write(io::StringContext, byte::UInt8) = - write(io.io, ESCAPED_ARRAY[byte + 0x01]) + write(io.io, ESCAPED_ARRAY[byte + 1]) #= turn on if there's a performance benefit write(io::StringContext, char::Char) = char <= '\x7f' ? write(io, ESCAPED_ARRAY[UInt8(c) + 0x01]) : From 2c104de1bded64d724170d5382af56a528423147 Mon Sep 17 00:00:00 2001 From: Sebastian Pfitzner Date: Mon, 4 Mar 2024 13:29:53 +0100 Subject: [PATCH 2/2] chore: bump version to 0.20.2 --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 2a0d1b3..a826695 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "JSON" uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -version = "0.20.1" +version = "0.20.2" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"