Fix a variety of dumb bugs.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@14268 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2002-08-14 07:36:25 +00:00
parent aa0c6125ad
commit 18c22223ec
8 changed files with 37 additions and 8 deletions

View file

@ -548,6 +548,14 @@ boolValue_c(ivars self)
{
return YES;
}
else if (len == 4
&& (self->_contents.c[0] == 'T' || self->_contents.c[0] == 't')
&& (self->_contents.c[1] == 'R' || self->_contents.c[1] == 'r')
&& (self->_contents.c[2] == 'U' || self->_contents.c[2] == 'u')
&& (self->_contents.c[3] == 'E' || self->_contents.c[3] == 'e'))
{
return YES;
}
else
{
unsigned char buf[len+1];
@ -580,6 +588,14 @@ boolValue_u(ivars self)
{
return YES;
}
else if (l == 4
&& (buf[0] == 'T' || buf[0] == 't')
&& (buf[1] == 'R' || buf[1] == 'r')
&& (buf[2] == 'U' || buf[2] == 'u')
&& (buf[3] == 'E' || buf[3] == 'e'))
{
return YES;
}
else
{
return atoi(buf);