aboutsummaryrefslogtreecommitdiff
path: root/jim-aio.c
diff options
context:
space:
mode:
authoroharboe <oharboe>2008-06-18 05:39:36 +0000
committeroharboe <oharboe>2008-06-18 05:39:36 +0000
commit66c3ed67e8414a0f4c0c2c12752695d5ce36aab2 (patch)
treeb479b786388e3734a91010f995de1bf489285a2e /jim-aio.c
parent11513743b6cb4aa26f7c52723f2563a89d8d3dd6 (diff)
downloadjimtcl-66c3ed67e8414a0f4c0c2c12752695d5ce36aab2.zip
jimtcl-66c3ed67e8414a0f4c0c2c12752695d5ce36aab2.tar.gz
jimtcl-66c3ed67e8414a0f4c0c2c12752695d5ce36aab2.tar.bz2
* 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.
Diffstat (limited to 'jim-aio.c')
-rw-r--r--jim-aio.c2
1 files changed, 1 insertions, 1 deletions
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);