From 9b406c21ffb4032bd89023052a9615b8b740f2d7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Apr 2026 15:30:21 +0530 Subject: [PATCH] Make CodeQL happy --- tools/watch/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/watch/api.go b/tools/watch/api.go index 463bcce5b..bf9839bfd 100644 --- a/tools/watch/api.go +++ b/tools/watch/api.go @@ -178,10 +178,13 @@ func EntryPoint(root *cli.Command) { if err != nil { return 1, err } - debounce_time_ms, err := strconv.ParseUint(args[1], 10, 64) + debounce_time_ms, err := strconv.Atoi(args[1]) if err != nil { return 1, err } + if debounce_time_ms < 0 { + return 0, fmt.Errorf("debounce_time must be >= 0") + } config_paths := utils.Map(resolve_path, args[2:]) if err = watch_for_kitty_config_changes( func() error { return signal_kitty_to_reload_config(kitty_pid) },