mirror of
https://github.com/cc65/cc65.git
synced 2024-07-05 06:28:57 +00:00
SB_GetNumber didn't handle a sign correctly
git-svn-id: svn://svn.cc65.org/cc65/trunk@2892 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
98e3d2815e
commit
6577ca9cb3
@ -126,7 +126,7 @@ Octal: I = 0;
|
|||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
@ -144,7 +144,7 @@ void SB_SkipWhite (StrBuf* B)
|
|||||||
int SB_GetSym (StrBuf* B, char* S)
|
int SB_GetSym (StrBuf* B, char* S)
|
||||||
/* Get a symbol from the string buffer. S must be able to hold MAX_IDENTLEN
|
/* Get a symbol from the string buffer. S must be able to hold MAX_IDENTLEN
|
||||||
* characters. Returns 1 if a symbol was found and 0 otherwise.
|
* characters. Returns 1 if a symbol was found and 0 otherwise.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
if (IsIdent (SB_Peek (B))) {
|
if (IsIdent (SB_Peek (B))) {
|
||||||
unsigned I = 0;
|
unsigned I = 0;
|
||||||
@ -308,6 +308,7 @@ int SB_GetNumber (StrBuf* B, long* Val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Success, value read is in Val */
|
/* Success, value read is in Val */
|
||||||
|
*Val *= Sign;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user