Fossil SCM

Fix an uninitialized variable in the previous check-in.

drh 2024-05-09 20:55 trunk
Commit 6e68958586315c3cebb9c9c259219671dde1840e5da429565a065a100e2deaeb
1 file changed +2
--- src/merge.c
+++ src/merge.c
@@ -470,16 +470,18 @@
470470
" coalesce(euser, user)"
471471
" FROM event, blob"
472472
" WHERE event.objid=%d AND blob.rid=%d",
473473
mid, mid
474474
);
475
+ zVersion = 0;
475476
if( db_step(&q)==SQLITE_ROW ){
476477
char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"",
477478
db_column_text(&q, 0), db_column_text(&q, 1),
478479
db_column_text(&q, 3), db_column_text(&q, 2));
479480
comment_print(zCom, db_column_text(&q,2), 0, -1, get_comment_format());
480481
fossil_free(zCom);
482
+ zVersion = mprintf("%S",db_column_text(&q,0));
481483
}
482484
db_finalize(&q);
483485
}else{
484486
usage("?OPTIONS? ?VERSION?");
485487
return;
486488
--- src/merge.c
+++ src/merge.c
@@ -470,16 +470,18 @@
470 " coalesce(euser, user)"
471 " FROM event, blob"
472 " WHERE event.objid=%d AND blob.rid=%d",
473 mid, mid
474 );
 
475 if( db_step(&q)==SQLITE_ROW ){
476 char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"",
477 db_column_text(&q, 0), db_column_text(&q, 1),
478 db_column_text(&q, 3), db_column_text(&q, 2));
479 comment_print(zCom, db_column_text(&q,2), 0, -1, get_comment_format());
480 fossil_free(zCom);
 
481 }
482 db_finalize(&q);
483 }else{
484 usage("?OPTIONS? ?VERSION?");
485 return;
486
--- src/merge.c
+++ src/merge.c
@@ -470,16 +470,18 @@
470 " coalesce(euser, user)"
471 " FROM event, blob"
472 " WHERE event.objid=%d AND blob.rid=%d",
473 mid, mid
474 );
475 zVersion = 0;
476 if( db_step(&q)==SQLITE_ROW ){
477 char *zCom = mprintf("Merging fork [%S] at %s by %s: \"%s\"",
478 db_column_text(&q, 0), db_column_text(&q, 1),
479 db_column_text(&q, 3), db_column_text(&q, 2));
480 comment_print(zCom, db_column_text(&q,2), 0, -1, get_comment_format());
481 fossil_free(zCom);
482 zVersion = mprintf("%S",db_column_text(&q,0));
483 }
484 db_finalize(&q);
485 }else{
486 usage("?OPTIONS? ?VERSION?");
487 return;
488

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button