Fossil SCM
Wrong parameter type: should be 64 bits otherwise the diffFlags parameter cannot hold all possible bits.
Commit
d3f69bd48ec279739a88041de5572bf616f91fe2
Parent
2dffb0e0262ace1…
1 file changed
+2
-2
+2
-2
| --- src/diff.c | ||
| +++ src/diff.c | ||
| @@ -128,15 +128,15 @@ | ||
| 128 | 128 | ** too long. |
| 129 | 129 | ** |
| 130 | 130 | ** Profiling show that in most cases this routine consumes the bulk of |
| 131 | 131 | ** the CPU time on a diff. |
| 132 | 132 | */ |
| 133 | -static DLine *break_into_lines(const char *z, int n, int *pnLine, int diffFlags){ | |
| 133 | +static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ | |
| 134 | 134 | int nLine, i, j, k, x; |
| 135 | 135 | unsigned int h, h2; |
| 136 | 136 | DLine *a; |
| 137 | - int ignoreWS = diffFlags & DIFF_IGNORE_EOLWS; | |
| 137 | + int ignoreWS = (diffFlags & DIFF_IGNORE_EOLWS)!=0; | |
| 138 | 138 | |
| 139 | 139 | /* Count the number of lines. Allocate space to hold |
| 140 | 140 | ** the returned array. |
| 141 | 141 | */ |
| 142 | 142 | for(i=j=0, nLine=1; i<n; i++, j++){ |
| 143 | 143 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -128,15 +128,15 @@ | |
| 128 | ** too long. |
| 129 | ** |
| 130 | ** Profiling show that in most cases this routine consumes the bulk of |
| 131 | ** the CPU time on a diff. |
| 132 | */ |
| 133 | static DLine *break_into_lines(const char *z, int n, int *pnLine, int diffFlags){ |
| 134 | int nLine, i, j, k, x; |
| 135 | unsigned int h, h2; |
| 136 | DLine *a; |
| 137 | int ignoreWS = diffFlags & DIFF_IGNORE_EOLWS; |
| 138 | |
| 139 | /* Count the number of lines. Allocate space to hold |
| 140 | ** the returned array. |
| 141 | */ |
| 142 | for(i=j=0, nLine=1; i<n; i++, j++){ |
| 143 |
| --- src/diff.c | |
| +++ src/diff.c | |
| @@ -128,15 +128,15 @@ | |
| 128 | ** too long. |
| 129 | ** |
| 130 | ** Profiling show that in most cases this routine consumes the bulk of |
| 131 | ** the CPU time on a diff. |
| 132 | */ |
| 133 | static DLine *break_into_lines(const char *z, int n, int *pnLine, u64 diffFlags){ |
| 134 | int nLine, i, j, k, x; |
| 135 | unsigned int h, h2; |
| 136 | DLine *a; |
| 137 | int ignoreWS = (diffFlags & DIFF_IGNORE_EOLWS)!=0; |
| 138 | |
| 139 | /* Count the number of lines. Allocate space to hold |
| 140 | ** the returned array. |
| 141 | */ |
| 142 | for(i=j=0, nLine=1; i<n; i++, j++){ |
| 143 |