Fossil SCM
Minor further speed-up: Only increment pointer if really needed.
Commit
5be2e9cf7d44838ae42f9505afc7d38e9b22d425
Parent
6a59dbbb99b1298…
1 file changed
+1
-1
+1
-1
| --- src/lookslike.c | ||
| +++ src/lookslike.c | ||
| @@ -192,11 +192,11 @@ | ||
| 192 | 192 | while( --n>0 ){ |
| 193 | 193 | c2 = c; |
| 194 | 194 | c = *++z; |
| 195 | 195 | if( c2>=0x80 ){ |
| 196 | 196 | const unsigned char *def = &lb_tab[(2*c2)-0x100]; |
| 197 | - if( (c<*def++) || (c>*def++) ){ | |
| 197 | + if( (c<*def) || (c>*++def) ){ | |
| 198 | 198 | return LOOK_INVALID; /* Invalid UTF-8 */ |
| 199 | 199 | } |
| 200 | 200 | if( c2>=0xe0 ){ |
| 201 | 201 | c = (c2<<1)|3; |
| 202 | 202 | }else{ |
| 203 | 203 |
| --- src/lookslike.c | |
| +++ src/lookslike.c | |
| @@ -192,11 +192,11 @@ | |
| 192 | while( --n>0 ){ |
| 193 | c2 = c; |
| 194 | c = *++z; |
| 195 | if( c2>=0x80 ){ |
| 196 | const unsigned char *def = &lb_tab[(2*c2)-0x100]; |
| 197 | if( (c<*def++) || (c>*def++) ){ |
| 198 | return LOOK_INVALID; /* Invalid UTF-8 */ |
| 199 | } |
| 200 | if( c2>=0xe0 ){ |
| 201 | c = (c2<<1)|3; |
| 202 | }else{ |
| 203 |
| --- src/lookslike.c | |
| +++ src/lookslike.c | |
| @@ -192,11 +192,11 @@ | |
| 192 | while( --n>0 ){ |
| 193 | c2 = c; |
| 194 | c = *++z; |
| 195 | if( c2>=0x80 ){ |
| 196 | const unsigned char *def = &lb_tab[(2*c2)-0x100]; |
| 197 | if( (c<*def) || (c>*++def) ){ |
| 198 | return LOOK_INVALID; /* Invalid UTF-8 */ |
| 199 | } |
| 200 | if( c2>=0xe0 ){ |
| 201 | c = (c2<<1)|3; |
| 202 | }else{ |
| 203 |