File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,21 +140,8 @@ nexttok(const char **pos, struct strbuf *buf)
140140 for (p = * pos ; * p ;) {
141141 switch (* p ) {
142142 case '}' :
143- if (p [1 ] != '}' )
144- return - EINVAL ;
145- r = strbuf_putc (buf , '}' );
146- if (r < 0 )
147- return r ;
148- p += 2 ;
149- break ;
143+ return - EINVAL ;
150144 case '{' :
151- if (p [1 ] == '{' ) {
152- r = strbuf_putc (buf , '{' );
153- if (r < 0 )
154- return r ;
155- p += 2 ;
156- continue ;
157- }
158145 * pos = p ;
159146 if (buf -> len > 0 )
160147 return TTEXT ;
@@ -173,6 +160,12 @@ nexttok(const char **pos, struct strbuf *buf)
173160 case '0' :
174161 r = strbuf_putc (buf , '\0' );
175162 break ;
163+ case '{' :
164+ r = strbuf_putc (buf , '{' );
165+ break ;
166+ case '}' :
167+ r = strbuf_putc (buf , '}' );
168+ break ;
176169 default :
177170 r = strbuf_putc (buf , '\\' );
178171 if (r < 0 )
You can’t perform that action at this time.
0 commit comments