Skip to content

Commit

Permalink
fix reading loop on arm (fixes #55)
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco149 committed Jul 10, 2019
1 parent 3b49620 commit 71103a0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions oppai.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ OPPAIAPI char* oppai_version_str(void);

#define OPPAI_VERSION_MAJOR 3
#define OPPAI_VERSION_MINOR 2
#define OPPAI_VERSION_PATCH 2
#define OPPAI_VERSION_PATCH 3
#define STRINGIFY_(x) #x
#define STRINGIFY(x) STRINGIFY_(x)

Expand Down Expand Up @@ -1382,8 +1382,7 @@ void p_reset(ezpp_t ez) {
int p_map(ezpp_t ez, FILE* f) {
char* p;
char* bufend;
char c;
int n;
int c, n;
slice_t line;
if (!f) {
return ERR_IO;
Expand All @@ -1399,11 +1398,11 @@ int p_map(ezpp_t ez, FILE* f) {
if (p >= bufend) {
return ERR_TRUNCATED;
}
c = (char)fgetc(f);
c = fgetc(f);
if (c == '\n' || c == EOF) {
break;
}
*p++ = c;
*p++ = (char)c;
}
*p = 0;
line.start = ez->buf;
Expand Down

0 comments on commit 71103a0

Please sign in to comment.