changeset 841:44478bd99873

[xemacs-hg @ 2002-05-14 15:15:58 by ben] crash fixes text.c: Fix bug leading to crashes with multibyte text. win32.c: Fix crash due to errant xfree(). xemacs.mak: Run tests with the packages so we don't get errors about advice not present, etc.
author ben
date Tue, 14 May 2002 15:16:08 +0000
parents 1e4e42de23d5
children dc12269565c9
files nt/ChangeLog nt/xemacs.mak src/ChangeLog src/text.c src/win32.c
diffstat 5 files changed, 25 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/nt/ChangeLog	Tue May 14 13:04:00 2002 +0000
+++ b/nt/ChangeLog	Tue May 14 15:16:08 2002 +0000
@@ -1,3 +1,10 @@
+2002-05-14  Ben Wing  <ben@xemacs.org>
+
+	* xemacs.mak (batch_test_emacs):
+	* xemacs.mak (check):
+	Run tests with the packages so we don't get errors about
+	advice not present, etc.
+
 2002-05-14  Ben Wing  <ben@xemacs.org>
 
 	* xemacs.mak (CONFIG_VALUES):
--- a/nt/xemacs.mak	Tue May 14 13:04:00 2002 +0000
+++ b/nt/xemacs.mak	Tue May 14 15:16:08 2002 +0000
@@ -957,7 +957,7 @@
 run_temacs    = $(temacs_loadup) run-temacs
 ## We have automated tests!!
 testdir=../tests/automated
-batch_test_emacs=$(BATCH) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
+batch_test_emacs=$(BATCH_PACKAGES) -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
 
 # .PHONY: check check-temacs
 
--- a/src/ChangeLog	Tue May 14 13:04:00 2002 +0000
+++ b/src/ChangeLog	Tue May 14 15:16:08 2002 +0000
@@ -1,3 +1,10 @@
+2002-05-14  Ben Wing  <ben@xemacs.org>
+
+	* text.c (copy_buffer_text_out): Fix bug leading to crashes
+	with multibyte text.
+	* win32.c (Fmswindows_shell_execute): Fix crash due to errant
+	xfree().
+
 2002-05-14  Ben Wing  <ben@xemacs.org>
 
 	* callproc.c (Fold_call_process_internal):
--- a/src/text.c	Tue May 14 13:04:00 2002 +0000
+++ b/src/text.c	Tue May 14 15:16:08 2002 +0000
@@ -1189,7 +1189,16 @@
 	  {
 	    dst += the_dst_used;
 	    dstlen -= the_dst_used;
-	    if (!dstlen)
+	    /* Stop if we didn't use all of the source text.  Also stop
+	       if the destination is full.  We need the first test because
+	       there might be a couple bytes left in the destination, but
+	       not enough to fit a full character.  The first test will in
+	       fact catch the vast majority of cases where the destination
+	       is empty, too -- but in case the destination holds *exactly*
+	       the run length, we put in the second check. (It shouldn't
+	       really matter though -- next time through we'll just get a
+	       0.) */
+	    if (the_src_used < runlen || !dstlen)
 	      break;
 	  }
       }
--- a/src/win32.c	Tue May 14 13:04:00 2002 +0000
+++ b/src/win32.c	Tue May 14 15:16:08 2002 +0000
@@ -338,8 +338,6 @@
     ret = (int) qxeShellExecute (NULL, opext, doc, parmext, path,
 				 (INTP (show_flag) ?
 				  XINT (show_flag) : SW_SHOWDEFAULT));
-
-    xfree (doc);
   }
 
   if (ret <= 32)