Avoid integer overflow in analysis.getPositionContext
(#998)
This commit is contained in:
parent
b28d3aadd7
commit
290ed6e7e7
@ -1577,7 +1577,7 @@ pub fn getPositionContext(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
const q = std.mem.lastIndexOf(u8, held_line, "\"") orelse return .other;
|
const q = std.mem.lastIndexOf(u8, held_line, "\"") orelse return .other;
|
||||||
if (held_line[q - 1] == '@') {
|
if (held_line[q -| 1] == '@') {
|
||||||
tok.tag = .identifier;
|
tok.tag = .identifier;
|
||||||
} else {
|
} else {
|
||||||
tok.tag = .string_literal;
|
tok.tag = .string_literal;
|
||||||
|
Loading…
Reference in New Issue
Block a user