summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/onefiledist.yml2
-rw-r--r--generic/tclUtil.c8
-rw-r--r--generic/tclZipfs.c2
-rw-r--r--tests/string.test18
4 files changed, 24 insertions, 6 deletions
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml
index 158542a..df98bec 100644
--- a/.github/workflows/onefiledist.yml
+++ b/.github/workflows/onefiledist.yml
@@ -55,7 +55,7 @@ jobs:
run: |
mkdir 1dist
touch generic/tclStubInit.c generic/tclOOStubInit.c || true
- wget https://github.com/culler/macher/releases/download/v1.2/macher
+ wget https://github.com/culler/macher/releases/download/v1.3/macher
sudo cp macher /usr/local/bin
sudo chmod a+x /usr/local/bin/macher
echo "VER_PATH=$(cd tools; pwd)/addVerToFile.tcl" >> $GITHUB_ENV
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 1decb05..d5ec040 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -1718,14 +1718,14 @@ TclTrimRight(
*/
do {
- int qInc = TclUtfToUCS4(q, &ch2);
+ pInc = TclUtfToUCS4(q, &ch2);
if (ch1 == ch2) {
break;
}
- q += qInc;
- bytesLeft -= qInc;
+ q += pInc;
+ bytesLeft -= pInc;
} while (bytesLeft);
if (bytesLeft == 0) {
@@ -1771,7 +1771,7 @@ TclTrimLeft(
* rely on (trim[numTrim] == '\0'). */
{
const char *p = bytes;
- int ch1, ch2;
+ int ch1, ch2;
/* Empty strings -> nothing to do */
if ((numBytes == 0) || (numTrim == 0)) {
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 50653ff..0d646aa 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -3113,7 +3113,7 @@ TclZipfs_TclLibrary(void)
{
Tcl_Obj *vfsInitScript;
int found;
-#ifdef _WIN32
+#if defined(_WIN32) && !defined(STATIC_BUILD)
HMODULE hModule;
WCHAR wName[MAX_PATH + LIBRARY_SIZE];
char dllName[(MAX_PATH + LIBRARY_SIZE) * 3];
diff --git a/tests/string.test b/tests/string.test
index 50fcea7..b01d059 100644
--- a/tests/string.test
+++ b/tests/string.test
@@ -2086,6 +2086,24 @@ test string-24.15.$noComp {string reverse command - pure bytearray} {
binary scan [run {tcl::string::reverse [binary format H* 010203]}] H* x
set x
} 030201
+test string-24.16.$noComp {string reverse command - surrogates} knownBug {
+ run {string reverse \u0444bulb\uD83D\uDE02}
+} \uD83D\uDE02blub\u0444
+test string-24.17.$noComp {string reverse command - surrogates} knownBug {
+ run {string reverse \uD83D\uDE02hello\uD83D\uDE02}
+} \uD83D\uDE02olleh\uD83D\uDE02
+test string-24.18.$noComp {string reverse command - surrogates} knownBug {
+ set s \u0444bulb\uD83D\uDE02
+ # shim shimmery ...
+ string index $s 0
+ run {string reverse $s}
+} \uD83D\uDE02blub\u0444
+test string-24.19.$noComp {string reverse command - surrogates} knownBug {
+ set s \uD83D\uDE02hello\uD83D\uDE02
+ # shim shimmery ...
+ string index $s 0
+ run {string reverse $s}
+} \uD83D\uDE02olleh\uD83D\uDE02
test string-25.1.$noComp {string is list} {
run {string is list {a b c}}