aboutsummaryrefslogtreecommitdiff
path: root/src/cached.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-07-09 13:35:52 +0100
committergingerBill <bill@gingerbill.org>2024-07-09 13:35:52 +0100
commit68b70a21831b3128828357e8af366a377283fa80 (patch)
treeb56b3eaa87ed3d39221baa210bd88d74078b3cf7 /src/cached.cpp
parentccdad8b8dd3af934ef12e833b79c239c8a04895e (diff)
Check for bounds check error
Diffstat (limited to 'src/cached.cpp')
-rw-r--r--src/cached.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cached.cpp b/src/cached.cpp
index 83950c82b..ab6d99848 100644
--- a/src/cached.cpp
+++ b/src/cached.cpp
@@ -259,6 +259,9 @@ bool try_cached_build(Checker *c) {
timestamp_str = string_trim_whitespace(timestamp_str);
path_str = string_trim_whitespace(path_str);
+ if (file_count >= files.count) {
+ goto do_write_file;
+ }
if (files[file_count] != path_str) {
goto do_write_file;
}