Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lex/lex.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ css_error Hash(css_lexer *lexer, css_token **token)
return error;

/* Require at least one NMChar otherwise, we're just a raw '#' */
if (lexer->bytesReadForToken - lexer->context.origBytes > 0)
if (lexer->bytesReadForToken > lexer->context.origBytes)
return emitToken(lexer, CSS_TOKEN_HASH, token);

return emitToken(lexer, CSS_TOKEN_CHAR, token);
Expand Down
4 changes: 2 additions & 2 deletions src/parse/language.c
Original file line number Diff line number Diff line change
Expand Up @@ -1194,15 +1194,15 @@ css_error parseNth(css_language *c,
data[consumed] != 'N'))
return CSS_INVALID;

if (len - (++consumed) > 0) {
if (++consumed < len) {
if (data[consumed] != '-')
return CSS_INVALID;

/* 2n- */
sign = -1;
had_sign = true;

if (len - (++consumed) > 0) {
if (++consumed < len) {
size_t bstart;

/* Reject additional sign */
Expand Down