@@ -70,7 +70,7 @@ func (vec *Vector) parseGeneric(depth, offset int, node *vector.Node) (int, erro
70
70
// Save offset of string value.
71
71
node .Value ().TakeAddr (vec .Src ()).SetOffset (offset + 1 )
72
72
// Get index of end of string value.
73
- e := bytealg .IndexByteAtLR (vec .Src (), '"' , offset + 1 )
73
+ e := bytealg .IndexByteAtLUR (vec .Src (), '"' , offset + 1 )
74
74
if e < 0 {
75
75
return vec .SrcLen (), vector .ErrUnexpEOS
76
76
}
@@ -83,7 +83,7 @@ func (vec *Vector) parseGeneric(depth, offset int, node *vector.Node) (int, erro
83
83
// Walk over double quotas and look for unescaped.
84
84
_ = vec .Src ()[vec .SrcLen ()- 1 ]
85
85
for i := e ; i < vec .SrcLen (); {
86
- i = bytealg .IndexByteAtLR (vec .Src (), '"' , i + 1 )
86
+ i = bytealg .IndexByteAtLUR (vec .Src (), '"' , i + 1 )
87
87
if i < 0 {
88
88
e = vec .SrcLen () - 1
89
89
break
@@ -99,7 +99,7 @@ func (vec *Vector) parseGeneric(depth, offset int, node *vector.Node) (int, erro
99
99
}
100
100
if ! node .Value ().CheckBit (flagEscape ) {
101
101
// Extra check of escaping sequences.
102
- node .Value ().SetBit (flagEscape , bytealg .HasByteLR (node .Value ().RawBytes (), '\\' ))
102
+ node .Value ().SetBit (flagEscape , bytealg .HasByteLUR (node .Value ().RawBytes (), '\\' ))
103
103
}
104
104
case isDigit (vec .SrcAt (offset )):
105
105
// Check number node.
@@ -170,7 +170,7 @@ func (vec *Vector) parseObj(depth, offset int, node *vector.Node) (int, error) {
170
170
child , i := vec .GetChild (node , depth )
171
171
// Fill up key's offset and length.
172
172
child .Key ().TakeAddr (vec .Src ()).SetOffset (offset )
173
- e := bytealg .IndexByteAtLR (vec .Src (), '"' , offset + 1 )
173
+ e := bytealg .IndexByteAtLUR (vec .Src (), '"' , offset + 1 )
174
174
if e < 0 {
175
175
return vec .SrcLen (), vector .ErrUnexpEOS
176
176
}
@@ -183,7 +183,7 @@ func (vec *Vector) parseObj(depth, offset int, node *vector.Node) (int, error) {
183
183
// Key contains escaped bytes.
184
184
_ = vec .Src ()[vec .SrcLen ()- 1 ]
185
185
for i := e ; i < len (vec .Src ()); {
186
- i = bytealg .IndexByteAtLR (vec .Src (), '"' , i + 1 )
186
+ i = bytealg .IndexByteAtLUR (vec .Src (), '"' , i + 1 )
187
187
if i < 0 {
188
188
e = vec .SrcLen () - 1
189
189
break
@@ -199,7 +199,7 @@ func (vec *Vector) parseObj(depth, offset int, node *vector.Node) (int, error) {
199
199
}
200
200
if ! child .Key ().CheckBit (flagEscape ) {
201
201
// Extra check of escaped sequences in the key.
202
- child .Key ().SetBit (flagEscape , bytealg .HasByteLR (child .KeyBytes (), '\\' ))
202
+ child .Key ().SetBit (flagEscape , bytealg .HasByteLUR (child .KeyBytes (), '\\' ))
203
203
}
204
204
if offset , eof = vec .skipFmt (offset ); eof {
205
205
return offset , vector .ErrUnexpEOF
0 commit comments