From 7bf5d46c8baaf9237db3508fbd9ca97a344e20e5 Mon Sep 17 00:00:00 2001 From: Kei Okada Date: Sun, 25 Jun 2017 17:45:36 +0900 Subject: [PATCH] lispio.c:READLINE cb[i-1] && i>=1 is not correct, use i>=1 && cb[i-1] --- lisp/c/lispio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/c/lispio.c b/lisp/c/lispio.c index a4715b450..24e52ab0d 100644 --- a/lisp/c/lispio.c +++ b/lisp/c/lispio.c @@ -226,7 +226,7 @@ pointer argv[]; if (eoferrorp==NIL) return(eofvalue); else error(E_EOF);} cb[i++]=ch;} - if (cb[i-1]=='\r' && (i>=1)) i=i-1; + if ((i>=1) && cb[i-1]=='\r') i=i-1; return(makestring((char *)cb,i));} pointer READCH(ctx,n,argv)