]> git.sur5r.net Git - cc65/commitdiff
SB_GetNumber didn't handle a sign correctly
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 2 Mar 2004 19:30:08 +0000 (19:30 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 2 Mar 2004 19:30:08 +0000 (19:30 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@2892 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/scanstrbuf.c

index b441ae3090ccc2af29c5c7c705b055afd03dd11d..dd3eba9bdc00c81ec49a72a91ad5f70a2fbe778e 100644 (file)
@@ -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)
 /* 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.
- */                               
+ */
 {
     if (IsIdent (SB_Peek (B))) {
         unsigned I = 0;
@@ -308,6 +308,7 @@ int SB_GetNumber (StrBuf* B, long* Val)
     }
 
     /* Success, value read is in Val */
+    *Val *= Sign;
     return 1;
 }