mirror of
https://github.com/vlang/v.git
synced 2025-09-14 09:56:16 -04:00
ci,x.json2.decoder2: fix sanitize jobs
This commit is contained in:
parent
318394dd47
commit
b511f2239e
@ -164,7 +164,8 @@ fn (mut decoder Decoder) check_struct_type_valid[T](s T, current_node Node[Value
|
|||||||
}
|
}
|
||||||
|
|
||||||
if unsafe {
|
if unsafe {
|
||||||
vmemcmp(decoder.json.str + key_info.position, type_field.str, type_field.len) == 0
|
key_info.position + type_field.len <= decoder.json.len
|
||||||
|
&& 0 == vmemcmp(decoder.json.str + key_info.position, type_field.str, type_field.len)
|
||||||
} {
|
} {
|
||||||
// find type field
|
// find type field
|
||||||
type_field_node = type_field_node.next
|
type_field_node = type_field_node.next
|
||||||
@ -184,8 +185,8 @@ fn (mut decoder Decoder) check_struct_type_valid[T](s T, current_node Node[Value
|
|||||||
unsafe {
|
unsafe {
|
||||||
}
|
}
|
||||||
if unsafe {
|
if unsafe {
|
||||||
vmemcmp(decoder.json.str + type_field_node.value.position + 1, variant_name.str,
|
type_field_node.value.position + 1 + variant_name.len <= decoder.json.len
|
||||||
variant_name.len) == 0
|
&& 0 == vmemcmp(decoder.json.str + type_field_node.value.position + 1, variant_name.str, variant_name.len)
|
||||||
} {
|
} {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user