[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r116863: Fix core dump in char-equal.
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-24 r116863: Fix core dump in char-equal. |
Date: |
Wed, 26 Mar 2014 05:35:41 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116863
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17011
committer: Paul Eggert <address@hidden>
branch nick: emacs-24
timestamp: Tue 2014-03-25 22:35:38 -0700
message:
Fix core dump in char-equal.
* editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
unibyte buffers, as we can't tell whether the characters are
actually unibyte.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/editfns.c editfns.c-20091113204419-o5vbwnq5f7feedwu-255
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-03-26 04:07:25 +0000
+++ b/src/ChangeLog 2014-03-26 05:35:38 +0000
@@ -1,5 +1,10 @@
2014-03-26 Paul Eggert <address@hidden>
+ Fix core dump in char-equal (Bug#17011).
+ * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
+ unibyte buffers, as we can't tell whether the characters are
+ actually unibyte.
+
* insdel.c (adjust_markers_for_delete): Remove unused local.
2014-03-24 Barry O'Reilly <address@hidden>
=== modified file 'src/editfns.c'
--- a/src/editfns.c 2014-01-24 16:05:12 +0000
+++ b/src/editfns.c 2014-03-26 05:35:38 +0000
@@ -4377,18 +4377,13 @@
if (NILP (BVAR (current_buffer, case_fold_search)))
return Qnil;
+ /* FIXME: When enable-multibyte-characters is nil, it's still possible
+ to manipulate multibyte chars, which means there is a bug for chars
+ in the range 128-255 as we can't tell whether they are eight-bit
+ bytes or Latin-1 chars. For now, assume the latter. See Bug#17011.
+ Also see casefiddle.c's casify_object, which has a similar problem. */
i1 = XFASTINT (c1);
- if (NILP (BVAR (current_buffer, enable_multibyte_characters))
- && ! ASCII_CHAR_P (i1))
- {
- MAKE_CHAR_MULTIBYTE (i1);
- }
i2 = XFASTINT (c2);
- if (NILP (BVAR (current_buffer, enable_multibyte_characters))
- && ! ASCII_CHAR_P (i2))
- {
- MAKE_CHAR_MULTIBYTE (i2);
- }
return (downcase (i1) == downcase (i2) ? Qt : Qnil);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r116863: Fix core dump in char-equal.,
Paul Eggert <=