diff --git a/bin/aed.bin b/bin/aed.bin index 8a742c2..3c02abb 100644 Binary files a/bin/aed.bin and b/bin/aed.bin differ diff --git a/src/text_buffer.c b/src/text_buffer.c index 3d89b85..8b6a2c0 100644 --- a/src/text_buffer.c +++ b/src/text_buffer.c @@ -37,7 +37,7 @@ text_buffer* tb_init(text_buffer* tb, int mem_kb, const char* fname) { tb->x_ = 0; tb->fname_[0] = 0; - if (fname != NULL && !tb_load(tb, fname)) { + if (!tb_load(tb, fname)) { lb_destroy(&tb->lb_); cb_destroy(&tb->cb_); return NULL; @@ -380,7 +380,7 @@ static bool tb_read(uint8_t fh, text_buffer* tb, int sz) { bool tb_load(text_buffer* tb, const char* fname) { if (fname == NULL) { - return false; + fname = "aed.txt"; } int fsz = strlen(fname);