Differences From:
File
src/checkin.c
part of check-in
[1871a93dd4]
- Fix bugs that can cause a segfault if a blank check-in comment
is entered.
by
drh on
2007-08-30 18:05:19.
[view]
To:
File
src/checkin.c
part of check-in
[f030c0aea7]
- Fix multiple bugs in the comment parser of the commit command.
Allow blank lines in comments.
by
drh on
2007-08-30 19:46:06.
[view]
@@ -236,9 +236,11 @@
n = blob_size(&line);
z = blob_buffer(&line);
for(i=0; i<n && isspace(z[i]); i++){}
if( i<n && z[i]=='#' ) continue;
- blob_appendf(pComment, "%b\n", &line);
+ if( i<n || blob_size(pComment)>0 ){
+ blob_appendf(pComment, "%b", &line);
+ }
}
blob_reset(&text);
zComment = blob_str(pComment);
i = strlen(zComment);