Skip to content

Commit

Permalink
Merge pull request #3 from Layer812/master
Browse files Browse the repository at this point in the history
fix core dump.
  • Loading branch information
vampirefrog authored Nov 17, 2024
2 parents b0d7870 + 4073e0f commit 898f5ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sjis2utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
int main(int argc, char **argv) {
FILE *in = stdin, *out = stdout;
if(argc > 1) in = fopen(argv[1], "rb");
if(argc > 2) out = fopen(argv[2], "rb");
if(argc > 2) out = fopen(argv[2], "wb");

int last_byte = 0;
int b = 0;
Expand Down
2 changes: 1 addition & 1 deletion utf82sjis.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
int main(int argc, char **argv) {
FILE *in = stdin, *out = stdout;
if(argc > 1) in = fopen(argv[1], "rb");
if(argc > 2) out = fopen(argv[2], "rb");
if(argc > 2) out = fopen(argv[2], "wb");

int b;
while((b = utf8_fgetc(in)) != EOF) {
Expand Down

0 comments on commit 898f5ce

Please sign in to comment.