diff --git a/ChangeLog b/ChangeLog index 7387c1be2..ce7f20319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-08 Richard Frith-Macdonald + + * Source/GSString.m: fix error getting cstring from literal containing + illegal characters. + 2007-06-03 Richard Frith-Macdonald * Source/GSHTTPURLHandle.m: define MSG_DONTWAIT as zero if it's not diff --git a/Source/GSString.m b/Source/GSString.m index 1afb07543..b87aabde7 100644 --- a/Source/GSString.m +++ b/Source/GSString.m @@ -1864,6 +1864,7 @@ getCStringE_c(GSStr self, char *buffer, unsigned int maxLength, * from internal format to unicode and then to the specified * C string encoding. */ + bytes = maxLength - sizeof(char); if (GSToUnicode(&u, &l, self->_contents.c, self->_count, internalEncoding, NSDefaultMallocZone(), 0) == NO) {