Skip to content

Commit

Permalink
Default to aed.txt if no file name is provided. (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
avalonbits authored Nov 13, 2023
1 parent 2c59eda commit 7a6a94e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified bin/aed.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions src/text_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7a6a94e

Please sign in to comment.