Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ttytm committed Apr 4, 2024
1 parent 74fc877 commit 18a90ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/checker/fn.v
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ fn (mut c Checker) fn_call(mut node ast.CallExpr, mut continue_check &bool) ast.
} else if node.args[1].expr is ast.Ident && node.args[1].expr.obj is ast.Var {
str_var := (node.args[1].expr.obj as ast.Var).expr
str_var_val := str_var.str()
if str_var_val.len > 2 && str_var_val[0] != `{` && str_var_val[0] != `[` {
if str_var_val.len > 2 && str_var_val[1] != `{` && str_var_val[1] != `[` {
c.error('json.decode: invalid json string', str_var.pos())
}
}
Expand Down

0 comments on commit 18a90ed

Please sign in to comment.