diff --git a/main.cpp b/main.cpp index 1e93744..f9aaf6f 100644 --- a/main.cpp +++ b/main.cpp @@ -94,7 +94,8 @@ void do_terminal() { } void load_code() { - FILE *f = fopen(get_filename(), "rb"); + const char* file = get_filename(); + FILE *f = fopen(file, "rb"); fseek(f, 0, SEEK_END); long fsize = ftell(f); fseek(f, 0, SEEK_SET); /* same as rewind(f); */ @@ -105,11 +106,17 @@ void load_code() { int start = 0; for (int pos=0;pos