Fixed integer overflow in semantic_tokens.Builder.handleComments
This commit is contained in:
parent
ab8c65eeda
commit
91643c04c9
@ -136,6 +136,9 @@ const Builder = struct {
|
||||
|
||||
/// Highlight normal comments and doc comments.
|
||||
fn handleComments(self: *Builder, from: usize, to: usize) !void {
|
||||
if (from == to) return;
|
||||
std.debug.assert(from < to);
|
||||
|
||||
const source = self.handle.tree.source;
|
||||
|
||||
var i: usize = from;
|
||||
|
@ -73,7 +73,6 @@ const Server = struct {
|
||||
|
||||
const result = ",\"result\":";
|
||||
const msg = rest[id_end + result.len .. rest.len - 1];
|
||||
|
||||
if (std.mem.eql(u8, msg, expected)) {
|
||||
return;
|
||||
} else {
|
||||
@ -108,7 +107,7 @@ const Server = struct {
|
||||
fn startZls() !*std.ChildProcess {
|
||||
std.debug.print("\n", .{});
|
||||
|
||||
var process = try std.ChildProcess.init(&[_][]const u8{"zig-out/bin/zls" ++ suffix}, allocator);
|
||||
var process = try std.ChildProcess.init(&[_][]const u8{"zig-cache/bin/zls" ++ suffix}, allocator);
|
||||
process.stdin_behavior = .Pipe;
|
||||
process.stdout_behavior = .Pipe;
|
||||
process.stderr_behavior = .Pipe; //std.ChildProcess.StdIo.Inherit;
|
||||
|
Loading…
Reference in New Issue
Block a user