summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-28 10:52:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-07-28 10:52:33 (GMT)
commit8f94fc24ac3dc9b2aa404543f40ace6827a8a81d (patch)
tree7e9b58d7e79344aa2a0a88c5e79c293961584abf /generic/tclIO.c
parent62933f53241ff9219570f01cbabcbdf0b672b2a4 (diff)
parentb2135d370a27336a752322824529602ac754a330 (diff)
downloadtcl-8f94fc24ac3dc9b2aa404543f40ace6827a8a81d.zip
tcl-8f94fc24ac3dc9b2aa404543f40ace6827a8a81d.tar.gz
tcl-8f94fc24ac3dc9b2aa404543f40ace6827a8a81d.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index b1286de..80780d7 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -4717,7 +4717,6 @@ Tcl_GetsObj(
eol = dst;
skip = 1;
if (GotFlag(statePtr, INPUT_SAW_CR)) {
- ResetFlag(statePtr, INPUT_SAW_CR);
if ((eol < dstEnd) && (*eol == '\n')) {
/*
* Skip the raw bytes that make up the '\n'.
@@ -4767,8 +4766,10 @@ Tcl_GetsObj(
skip++;
}
eol--;
+ ResetFlag(statePtr, INPUT_SAW_CR);
goto gotEOL;
} else if (*eol == '\n') {
+ ResetFlag(statePtr, INPUT_SAW_CR);
goto gotEOL;
}
}
@@ -4797,7 +4798,7 @@ Tcl_GetsObj(
Tcl_SetObjLength(objPtr, oldLength);
CommonGetsCleanup(chanPtr);
copiedTotal = -1;
- ResetFlag(statePtr, CHANNEL_BLOCKED);
+ ResetFlag(statePtr, CHANNEL_BLOCKED|INPUT_SAW_CR);
goto done;
}
goto gotEOL;