Skip to content

Commit

Permalink
fix windows CI failure/compiler panic
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Feb 18, 2025
1 parent 090c8da commit 74664b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/native/expr.v
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fn (mut g Gen) expr(node ast.Expr) {
ast.IntegerLiteral {
// Integer literal stores both signed and unsigned integers, some unsigned integers are too big for i64 but not for u64
println(node.val)
if node.val[0] == `-` { // if the number is negative
if node.val.len > 0 && node.val[0] == `-` { // if the number is negative
g.code_gen.mov64(g.code_gen.main_reg(), node.val.i64())
} else {
g.code_gen.mov64u(g.code_gen.main_reg(), node.val.u64())
Expand Down

0 comments on commit 74664b5

Please sign in to comment.