]> Shamusworld >> Repos - rmac/blobdiff - token.c
Fix for bug #51. Now at v2.0.22.
[rmac] / token.c
diff --git a/token.c b/token.c
index 1e5428200bf0ce952b748445e15349f42bd09765..fa5af09b1dd6d60d18bae85d8f59417f643c0d7d 100644 (file)
--- a/token.c
+++ b/token.c
@@ -22,7 +22,7 @@
 
 
 int lnsave;                                    // 1; strcpy() text of current line
-uint16_t curlineno;                    // Current line number (64K max currently)
+uint32_t curlineno;                    // Current line number (64K max currently)
 int totlines;                          // Total # of lines
 int mjump_align = 0;           // mjump alignment flag
 char lntag;                                    // Line tag
@@ -673,7 +673,6 @@ overflow:
 char * GetNextMacroLine(void)
 {
        IMACRO * imacro = cur_inobj->inobj.imacro;
-//     LONG * strp = imacro->im_nextln;
        LLIST * strp = imacro->im_nextln;
 
        if (strp == NULL)                                               // End-of-macro
@@ -1082,7 +1081,7 @@ DEBUG { printf("TokenizeLine: Calling fpop() from SRC_IFILE...\n"); }
        for(; *ln!=EOS;)
        {
                // Check to see if there's enough space in the token buffer
-               if (tk.cp >= ((uint8_t *)(&tokbuf[TOKBUFSIZE])))
+               if (tk.cp >= ((uint8_t *)(&tokbuf[TOKBUFSIZE])) - 20)
                {
                        return error("token buffer overrun");
                }