Minor bugfix

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@6746 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-06-21 08:27:30 +00:00
parent f1edebc42f
commit 680452aa99
2 changed files with 22 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2000-06-21 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSScanner.m: ([-scanHexInt:]) fixed to permit leading 0x or 0X
2000-06-20 Richard Frith-Macdonald <rfm@gnu.org>
* configure.in: Added check for recent libxml

View file

@ -394,6 +394,24 @@ typedef struct {
_scanLocation = saveScanLocation;
return NO;
}
if ((_scanLocation < myLength()) && (myCharacter(_scanLocation) == '0'))
{
_scanLocation++;
if (_scanLocation < myLength())
{
switch (myCharacter(_scanLocation))
{
case 'x':
case 'X':
_scanLocation++;
break;
default:
_scanLocation--;
break;
}
}
}
if ([self scanUnsignedInt_: value radix: 16 gotDigits: NO])
return YES;
_scanLocation = saveScanLocation;