From 66c3ed67e8414a0f4c0c2c12752695d5ce36aab2 Mon Sep 17 00:00:00 2001 From: oharboe Date: Wed, 18 Jun 2008 05:39:36 +0000 Subject: * ChangeLog, jim-aio.c: Andrew spotted a bug in the aio.gets implementation for lines that are more than AIO_BUF_LEN long. GCC 4.3.1 pointed out this problem. --- jim-aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jim-aio.c') diff --git a/jim-aio.c b/jim-aio.c index 9a41d32..203dc63 100644 --- a/jim-aio.c +++ b/jim-aio.c @@ -141,7 +141,7 @@ static int JimAioHandlerCommand(Jim_Interp *interp, int argc, buf[AIO_BUF_LEN-1] = '_'; if (fgets(buf, AIO_BUF_LEN, af->fp) == NULL) break; - if (buf[AIO_BUF_LEN-1] == '\0' && buf[AIO_BUF_LEN] == '\n') + if (buf[AIO_BUF_LEN-1] == '\0' && buf[AIO_BUF_LEN-2] != '\n') more = 1; if (more) { Jim_AppendString(interp, objPtr, buf, AIO_BUF_LEN-1); -- cgit v1.1