Fossil SCM
Remove unnecessary double NUL-termination from blob
Commit
95b6fad941774d1d20e0bc6733800227caf42e6f18cba61f2fd959d2289b237b
Parent
810370cd43f38cf…
1 file changed
+2
-2
+2
-2
| --- src/checkout.c | ||
| +++ src/checkout.c | ||
| @@ -276,13 +276,13 @@ | ||
| 276 | 276 | if( file_wd_size(zFile)<0 ){ |
| 277 | 277 | return 0; |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | 280 | /* Read "manifest.symlinks" into a blob to be analyzed. Simplify processing |
| 281 | - * by forcing it to end with newline-NUL. */ | |
| 281 | + * by forcing it to end with newline. (Blobs are always NUL-terminated.) */ | |
| 282 | 282 | blob_read_from_file(&content, zFile); |
| 283 | - blob_append(&content, "\n", 2); | |
| 283 | + blob_append(&content, "\n", 1); | |
| 284 | 284 | zLine = blob_buffer(&content); |
| 285 | 285 | |
| 286 | 286 | /* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm" |
| 287 | 287 | * temporary table. */ |
| 288 | 288 | db_begin_transaction(); |
| 289 | 289 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -276,13 +276,13 @@ | |
| 276 | if( file_wd_size(zFile)<0 ){ |
| 277 | return 0; |
| 278 | } |
| 279 | |
| 280 | /* Read "manifest.symlinks" into a blob to be analyzed. Simplify processing |
| 281 | * by forcing it to end with newline-NUL. */ |
| 282 | blob_read_from_file(&content, zFile); |
| 283 | blob_append(&content, "\n", 2); |
| 284 | zLine = blob_buffer(&content); |
| 285 | |
| 286 | /* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm" |
| 287 | * temporary table. */ |
| 288 | db_begin_transaction(); |
| 289 |
| --- src/checkout.c | |
| +++ src/checkout.c | |
| @@ -276,13 +276,13 @@ | |
| 276 | if( file_wd_size(zFile)<0 ){ |
| 277 | return 0; |
| 278 | } |
| 279 | |
| 280 | /* Read "manifest.symlinks" into a blob to be analyzed. Simplify processing |
| 281 | * by forcing it to end with newline. (Blobs are always NUL-terminated.) */ |
| 282 | blob_read_from_file(&content, zFile); |
| 283 | blob_append(&content, "\n", 1); |
| 284 | zLine = blob_buffer(&content); |
| 285 | |
| 286 | /* Insert each non-empty line of "manifest.symlinks" into the "symlink_perm" |
| 287 | * temporary table. */ |
| 288 | db_begin_transaction(); |
| 289 |