summary refs log tree commit diff
path: root/bin/edi/edi.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/edi/edi.c')
-rw-r--r--bin/edi/edi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/edi/edi.c b/bin/edi/edi.c
index fb6e3929..3a52e228 100644
--- a/bin/edi/edi.c
+++ b/bin/edi/edi.c
@@ -29,10 +29,12 @@ int main(int argc, char *argv[]) {
 	struct File file = fileAlloc(strdup(argv[1]));
 	fileRead(&file);
 
-	const struct Table *table = &file.log.states[file.log.state].table;
+	const struct Table *table = logTable(&file.log);
 	for (struct Iter it = iter(table, 0); it.ch != WEOF; it = iterNext(it)) {
 		printf("%lc", it.ch);
 	}
 
+	fileWrite(&file);
+
 	fileFree(&file);
 }