]> granicus.if.org Git - python/commitdiff
Don't truncate if size_t is bigger than uint
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 12 Jun 2006 02:07:57 +0000 (02:07 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 12 Jun 2006 02:07:57 +0000 (02:07 +0000)
Parser/tokenizer.c

index 92c2087262e74ac4073f69573d9e7ced4fea11f9..c58b6899b37e6b4853c03bcd560d59f0a8252b63 100644 (file)
@@ -1232,7 +1232,7 @@ tok_get(register struct tok_state *tok, char **p_start, char **p_end)
                do {
                        *tp++ = c = tok_nextc(tok);
                } while (c != EOF && c != '\n' &&
-                        (unsigned int)(tp - cbuf + 1) < sizeof(cbuf));
+                        (size_t)(tp - cbuf + 1) < sizeof(cbuf));
                *tp = '\0';
                for (cp = tabforms;
                     cp < tabforms + sizeof(tabforms)/sizeof(tabforms[0]);