File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1131,19 +1131,24 @@ where
11311131 if let Some ( webstorage_start_match) = webstorage_start_match {
11321132 let webstorage_open_bracket = webstorage_start_match. end ( ) ;
11331133
1134+ let mut next_char_escaped = false ;
11341135 let mut open_bracket_count: usize = 1 ;
11351136 let mut webstorage_close_bracket_offset: Option < usize > = None ;
1136- for ( offset, char) in ( 0_usize ..) . zip ( steam_user_localconfig_str[ webstorage_open_bracket..] . chars ( ) ) {
1137- if char == '{' {
1138- open_bracket_count += 1 ;
1139- } else if char == '}' {
1140- open_bracket_count -= 1 ;
1141- }
1137+ for ( offset, byte) in ( 0_usize ..) . zip ( steam_user_localconfig_str[ webstorage_open_bracket..] . bytes ( ) ) {
1138+ if !next_char_escaped {
1139+ if byte == b'{' {
1140+ open_bracket_count += 1 ;
1141+ } else if byte == b'}' {
1142+ open_bracket_count -= 1 ;
1143+ }
11421144
1143- if open_bracket_count == 0 {
1144- webstorage_close_bracket_offset = Some ( offset) ;
1145- break ;
1145+ if open_bracket_count == 0 {
1146+ webstorage_close_bracket_offset = Some ( offset) ;
1147+ break ;
1148+ }
11461149 }
1150+
1151+ next_char_escaped = byte == b'\\' ;
11471152 }
11481153
11491154 if let Some ( webstorage_close_bracket_offset) = webstorage_close_bracket_offset {
You can’t perform that action at this time.
0 commit comments