fix finding first argument of make-pipe when more than one argument is provided

This commit is contained in:
Spencer Florence 2018-12-17 21:35:04 -06:00 committed by Matthew Flatt
parent 2fe5f40dd7
commit 75550e79cc
2 changed files with 4 additions and 1 deletions

View File

@ -632,6 +632,9 @@
(let-values ([(r w) (make-pipe #f 'in 'out)])
(test 'in object-name r)
(test 'out object-name w))
(let-values ([(pin pout) (make-pipe 4 'name)])
(write-bytes (make-bytes 4) pout)
(test #f sync/timeout 0 pout))
(test #t input-port? (make-input-port void void void void))
(test #t input-port? (make-input-port void void #f void))

View File

@ -2157,7 +2157,7 @@ static Scheme_Object *sch_pipe(int argc, Scheme_Object **args)
Scheme_Object *v[2];
int bufmax;
if (argc == 1) {
if (argc > 0) {
Scheme_Object *o = args[0];
if (SCHEME_FALSEP(o)) {
bufmax = 0;