summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in6
-rw-r--r--win/tclWinDde.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 58811e5..af4ca68 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -620,7 +620,7 @@ $(GENERIC_DIR)/tclStubInit.c: $(GENERIC_DIR)/tcl.decls \
@echo "This warning can be safely ignored, do not report as a bug!"
genstubs:
- $(TCL_EXE) "$(ROOT_DIR_NATIVE)\tools\genStubs.tcl" \
+ $(TCL_EXE) "$(ROOT_DIR_NATIVE)/tools/genStubs.tcl" \
"$(GENERIC_DIR_NATIVE)" \
- "$(GENERIC_DIR_NATIVE)\tcl.decls" \
- "$(GENERIC_DIR_NATIVE)\tclInt.decls"
+ "$(GENERIC_DIR_NATIVE)/tcl.decls" \
+ "$(GENERIC_DIR_NATIVE)/tclInt.decls"
diff --git a/win/tclWinDde.c b/win/tclWinDde.c
index 4ef7f41..4aa6f71 100644
--- a/win/tclWinDde.c
+++ b/win/tclWinDde.c
@@ -593,9 +593,9 @@ DdeServerProc(
utilString = (char *) DdeAccessData(hData, &dlen);
uniStr = (Tcl_UniChar *) utilString;
if (!dlen) {
- /* Empty string. (Since TIP #106 we can create this!) */
+ /* Empty binary array. */
ddeObjectPtr = Tcl_NewObj();
- } else if (0) {
+ } else if ((dlen & 1) || uniStr[(dlen>>1)-1]) {
/* Cannot be unicode, so assume utf-8 */
if (!utilString[dlen-1]) {
dlen--;
@@ -604,7 +604,7 @@ DdeServerProc(
} else {
/* unicode */
dlen >>= 1;
- ddeObjectPtr = Tcl_NewUnicodeObj(uniStr, dlen);
+ ddeObjectPtr = Tcl_NewUnicodeObj(uniStr, dlen - 1);
}
Tcl_IncrRefCount(ddeObjectPtr);
DdeUnaccessData(hData);