Skip to content

Commit

Permalink
Partial reverted the removal of casts when calling match_class
Browse files Browse the repository at this point in the history
This fixes asserts when building with MSVC
  • Loading branch information
PG1003 committed Jan 6, 2022
1 parent 3e7e04f commit 4ffebc7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v1.1.1
# v1.1.2
- Added [[fallthrough]], [[nodiscard]] and [[unlikely]] attributes to
ensure code correctness and to provide compiler hints for optimazation.
- Removed the match_mode argument for the gmatch_iterator contructor.
Expand Down
4 changes: 2 additions & 2 deletions src/lex.h
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ bool matchbracketclass( StrCharT c, const PatCharT * p, const PatCharT * ep ) no
if( *p == '%' )
{
p++;
if( match_class( c, *p ) )
if( match_class( uc, *p ) )
{
return ret;
}
Expand Down Expand Up @@ -494,7 +494,7 @@ bool singlematch( const match_state< StrCharT, PatCharT > & ms, const StrCharT *
return true; // Matches any char

case '%':
return match_class( c, *( p + 1 ) );
return match_class( static_cast< uchar_t >( c ), *( p + 1 ) );

case '[':
return matchbracketclass( c, p, ep - 1 );
Expand Down

0 comments on commit 4ffebc7

Please sign in to comment.