1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-18 01:30:27 +02:00

Change from the head 2004-04-06 by Han-Wen Nienhuys:

Fixes srfi-13 string-index segv on strings containing 8-bit
characters, reported by Alexey Voinov.
* chars.h (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents
havoc when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
This commit is contained in:
Kevin Ryde 2005-03-25 20:54:09 +00:00
parent cb76f541e0
commit 1db3c9000f

View file

@ -51,7 +51,7 @@
*/
#define SCM_CHARP(x) (SCM_ITAG8(x) == scm_tc8_char)
#define SCM_CHAR(x) ((unsigned int)SCM_ITAG8_DATA(x))
#define SCM_MAKE_CHAR(x) SCM_MAKE_ITAG8((scm_t_bits) x, scm_tc8_char)
#define SCM_MAKE_CHAR(x) SCM_MAKE_ITAG8((scm_t_bits) (unsigned char) (x), scm_tc8_char)