mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-11 08:40:44 +00:00
Made setupWhitespace safer
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9738 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1990a58a31
commit
ed81edb18f
1 changed files with 4 additions and 2 deletions
|
@ -161,10 +161,12 @@ static void setupWhitespace()
|
||||||
NSData *bitmap;
|
NSData *bitmap;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
We can not use whitespaceAndNewlineCharacterSet here as this would lead
|
||||||
|
to a recursion, as this also reads in a property list.
|
||||||
|
whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
||||||
|
*/
|
||||||
whitespace = [NSCharacterSet characterSetWithCharactersInString:
|
whitespace = [NSCharacterSet characterSetWithCharactersInString:
|
||||||
@" \t\r\n\f\b"];
|
@" \t\r\n\f\b"];
|
||||||
*/
|
|
||||||
whitespace = [NSCharacterSet whitespaceAndNewlineCharacterSet];
|
|
||||||
|
|
||||||
bitmap = RETAIN([whitespace bitmapRepresentation]);
|
bitmap = RETAIN([whitespace bitmapRepresentation]);
|
||||||
whitespaceBitmapRep = [bitmap bytes];
|
whitespaceBitmapRep = [bitmap bytes];
|
||||||
|
|
Loading…
Reference in a new issue