Fix exciting new gcc 11 compiler warnings.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3973 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -682,8 +682,8 @@ void tf_ssb_run_file(JSContext* context, const char* file_name)
|
||||
long file_size = ftell(file);
|
||||
fseek(file, 0, SEEK_SET);
|
||||
source = tf_malloc(file_size + 1);
|
||||
fread(source, 1, file_size, file);
|
||||
source[file_size] = '\0';
|
||||
int bytes_read = fread(source, 1, file_size, file);
|
||||
source[bytes_read] = '\0';
|
||||
fclose(file);
|
||||
|
||||
JSValue result = JS_Eval(context, source, file_size, file_name, 0);
|
||||
|
Reference in New Issue
Block a user