Skip to content

Commit 3ebdcd2

Browse files
PoroCYonyupferris
authored andcommitted
[StandAlonePlayer] fix error printing causing a segfault
1 parent a5a9021 commit 3ebdcd2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WaveSabreStandAlonePlayer/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main(int argc, char **argv)
4747
size_t result;
4848

4949
pFile = fopen(argv[1], "rb");
50-
if (pFile == NULL) { fputs("File error", NULL); exit(1); }
50+
if (pFile == NULL) { printf("File error\n"); exit(1); }
5151

5252
// obtain file size:
5353
fseek(pFile, 0, SEEK_END);
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
5959

6060
// copy the file into the buffer:
6161
result = fread(buffer, 1, lSize, pFile);
62-
if (result != lSize) { fputs("Reading error", NULL); exit(3); }
62+
if (result != lSize) { printf("Reading error\n"); exit(3); }
6363

6464
// terminate
6565
fclose(pFile);

0 commit comments

Comments
 (0)