File tree Expand file tree Collapse file tree
crates/engine_xetex/xetex Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3510,6 +3510,12 @@ tt_cleanup(void) {
35103510 }
35113511 }
35123512
3513+ for (int i = 1 ; i <= in_open ; i ++ ) {
3514+ if (input_file [i ] != NULL ) {
3515+ u_close (input_file [i ]);
3516+ }
3517+ }
3518+
35133519 // Free the big allocated arrays
35143520 free (buffer );
35153521 free (nest );
Original file line number Diff line number Diff line change @@ -5040,18 +5040,21 @@ void begin_file_reading(void)
50405040 cur_input.synctex_tag = 0;
50415041}
50425042
5043- void end_file_reading(void)
5043+ void
5044+ end_file_reading(void)
50445045{
50455046 first = cur_input.start;
50465047 line = line_stack[cur_input.index];
5047- if ((cur_input.name == 18) || (cur_input.name == 19))
5048+
5049+ if (cur_input.name == 18 || cur_input.name == 19) {
50485050 pseudo_close();
5049- else if (cur_input.name > 17)
5051+ } else if (cur_input.name > 17) {
50505052 u_close(input_file[cur_input.index]);
5051- {
5052- input_ptr--;
5053- cur_input = input_stack[input_ptr];
5053+ input_file[cur_input.index] = NULL;
50545054 }
5055+
5056+ input_ptr--;
5057+ cur_input = input_stack[input_ptr];
50555058 in_open--;
50565059}
50575060
You can’t perform that action at this time.
0 commit comments