We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9c9095 commit b3ce57fCopy full SHA for b3ce57f
1 file changed
src/LibJSON.bas
@@ -2233,6 +2233,7 @@ Public Function EncodeURI(ByRef dataUTF16LE As Variant _
2233
Dim codepoint As Long
2234
Dim lowSurrogate As Long
2235
Dim buff As String
2236
+ Dim bLen As Long
2237
Dim defProp As Variant
2238
Dim isDefProp As Boolean
2239
'
@@ -2309,8 +2310,13 @@ Public Function EncodeURI(ByRef dataUTF16LE As Variant _
2309
2310
2311
i = 0
2312
j = 1
- buff = Space$(sizeW * 6)
2313
+ bLen = sizeW * 2 + 12
2314
+ buff = Space$(bLen)
2315
Do While i < sizeW
2316
+ If j + 12 > bLen Then
2317
+ buff = buff & Space$(bLen)
2318
+ bLen = bLen * 2
2319
+ End If
2320
codepoint = chars.arr(i) And &HFFFF&
2321
If codepoint >= &HD800& And codepoint <= &HDBFF& Then 'High surrogate
2322
If i < sizeW - 1 Then
0 commit comments