aboutsummaryrefslogtreecommitdiff
path: root/tomo.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-05-02 13:48:20 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-05-02 13:48:20 -0400
commita20f522fd61698282d3e01931260c588dd7f40b1 (patch)
tree6e2acbc9f3167001e74239d70ac3b1d5ea7935b7 /tomo.c
parent64baf34ea02b52f18a7eace17720579941912359 (diff)
Support space indents
Diffstat (limited to 'tomo.c')
-rw-r--r--tomo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tomo.c b/tomo.c
index 0aed42ba..168b8027 100644
--- a/tomo.c
+++ b/tomo.c
@@ -173,7 +173,7 @@ static void build_file_dependency_graph(const char *filename, table_t *dependenc
file_t *f = load_file(to_scan[s]);
if (!f) errx(1, "Couldn't find file: %s", to_scan[s]);
for (int64_t i = 0; i < f->num_lines; i++) {
- const char *line = f->text + f->lines[i].offset;
+ const char *line = f->text + f->line_offsets[i];
const char *prefix = "#include \"";
if (strncmp(line, prefix, strlen(prefix)) == 0) {
char *tmp = realpath(heap_strf("%s/%.*s", file_dir, strcspn(line + strlen(prefix), "\"") - 2, line + strlen(prefix)), NULL);