Mercurial > hg > xemacs-beta
changeset 2385:6b957313bd8e
[xemacs-hg @ 2004-11-13 06:32:24 by ben]
fix for Marcus's crash
text.c: Two different occurrences of a string stringized from the exact
same parameter may not necessarily be the same string, so check
with strcmp.
author | ben |
---|---|
date | Sat, 13 Nov 2004 06:32:25 +0000 |
parents | 7139b7bbcaec |
children | ecfffd1549ba |
files | src/ChangeLog src/text.c |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Fri Nov 12 22:52:42 2004 +0000 +++ b/src/ChangeLog Sat Nov 13 06:32:25 2004 +0000 @@ -1,3 +1,10 @@ +2004-11-12 Ben Wing <ben@xemacs.org> + + * text.c (find_pos_of_existing_active_alloca_convert): + Two different occurrences of a string stringized from the exact + same parameter may not necessarily be the same string, so check + with strcmp. + 2004-11-12 Jerry James <james@xemacs.org> * lstream.c (Lstream_really_write): Don't call the flusher if the
--- a/src/text.c Fri Nov 12 22:52:42 2004 +0000 +++ b/src/text.c Sat Nov 13 06:32:25 2004 +0000 @@ -4477,7 +4477,12 @@ for (i = 0; i < Dynarr_length (active_alloca_convert); i++) { vals = Dynarr_atp (active_alloca_convert, i); - if (vals->srctext == srctext) + /* On my system, two different occurrences of the same stringized + argument always point to the same string. However, on someone + else's system, that wasn't the case. We check for equality + first, since it seems systems work my way more than the other + way. */ + if (vals->srctext == srctext || !strcmp (vals->srctext, srctext)) return i; }