Skip to content

Commit

Permalink
Same bug as #144 for .
Browse files Browse the repository at this point in the history
  • Loading branch information
dvanhorn committed Jul 2, 2023
1 parent 4dfc2ee commit 1f5324f
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion langs/evildoer/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val_t peek_byte(void)
{
char c = getc(in);
ungetc(c, in);
return (c == EOF) ? val_wrap_eof() : val_wrap_int(c);
return (c == EOF) ? val_wrap_eof() : val_wrap_byte(c);

}

Expand Down
2 changes: 1 addition & 1 deletion langs/extort/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val_t peek_byte(void)
{
char c = getc(in);
ungetc(c, in);
return (c == EOF) ? val_wrap_eof() : val_wrap_int(c);
return (c == EOF) ? val_wrap_eof() : val_wrap_byte(c);

}

Expand Down
2 changes: 1 addition & 1 deletion langs/fraud/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val_t peek_byte(void)
{
char c = getc(in);
ungetc(c, in);
return (c == EOF) ? val_wrap_eof() : val_wrap_int(c);
return (c == EOF) ? val_wrap_eof() : val_wrap_byte(c);

}

Expand Down
2 changes: 1 addition & 1 deletion langs/hoax/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val_t peek_byte(void)
{
char c = getc(in);
ungetc(c, in);
return (c == EOF) ? val_wrap_eof() : val_wrap_int(c);
return (c == EOF) ? val_wrap_eof() : val_wrap_byte(c);

}

Expand Down
2 changes: 1 addition & 1 deletion langs/hustle/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val_t peek_byte(void)
{
char c = getc(in);
ungetc(c, in);
return (c == EOF) ? val_wrap_eof() : val_wrap_int(c);
return (c == EOF) ? val_wrap_eof() : val_wrap_byte(c);

}

Expand Down
2 changes: 1 addition & 1 deletion langs/iniquity/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val_t peek_byte(void)
{
char c = getc(in);
ungetc(c, in);
return (c == EOF) ? val_wrap_eof() : val_wrap_int(c);
return (c == EOF) ? val_wrap_eof() : val_wrap_byte(c);

}

Expand Down
2 changes: 1 addition & 1 deletion langs/jig/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ val_t peek_byte(void)
{
char c = getc(in);
ungetc(c, in);
return (c == EOF) ? val_wrap_eof() : val_wrap_int(c);
return (c == EOF) ? val_wrap_eof() : val_wrap_byte(c);

}

Expand Down
3 changes: 2 additions & 1 deletion ziggy/src/test/test-runner.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@

(check-equal? (run "ab" '(peek-byte)) (cons 97 ""))
(check-equal? (run "ab" '(begin (peek-byte) (read-byte))) (cons 97 ""))
(check-equal? (run "" '(read-byte)) (cons 226 "")))
(check-equal? (run "" '(read-byte)) (cons 226 ""))
(check-equal? (run "" '(peek-byte)) (cons 226 "")))

{:> E1}
(begin ;; Extort
Expand Down

0 comments on commit 1f5324f

Please sign in to comment.