aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog8
-rw-r--r--jim-aio.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 2c0a83f..3adb180 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-17 Andrew Lunn <andrew@lunn.ch> / oharboe
+
+ * 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.
+
2008-06-16 oharboe
* retire CVS keyword expansion. Plays havoc with patches.
@@ -930,7 +936,7 @@
2005-03-04 13:32 antirez
* ChangeLog, jim-posix.c, jim-win32.c, jim-win32com.c, jim.c,
- jim.h, test.tcl: xid: ..x strings added
+ jim.h, test.tcl: $id: ..$ strings added
2005-03-04 13:15 antirez
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);