Skip to content

Commit 84689d4

Browse files
committed
Fixes #4 - Arguments to the fprintfM() function were ordered incorrectly, and this caused the --before and --context arguments to crash.
1 parent 9655af7 commit 84689d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/print.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ void print_file_matches(const char *path, const char *buf, const size_t buf_len,
299299
UINT cp = CP_UTF8;
300300
if (enc == ENC_WIN_CP)
301301
cp = CP_ACP;
302-
fprintfM(out_fd, "%s\n", print_context.context_prev_lines[print_context.prev_line], cp);
302+
fprintfM(cp, out_fd, "%s\n", print_context.context_prev_lines[print_context.prev_line]);
303303
#endif
304304
}
305305
}

0 commit comments

Comments
 (0)