Fossil SCM

Fix a bug in the manifest generator that was introduced by check-in [01e4de6b8ae936b].

drh 2012-06-29 23:45 trunk
Commit 5f3a0681a0e403ab66776378a1cf87f3237b1765
1 file changed +2 -1
+2 -1
--- src/db.c
+++ src/db.c
@@ -1378,11 +1378,11 @@
13781378
** named on the command line (g.aCommitFile is NULL meaning that all
13791379
** changes are to be committed) or if id is found in g.aCommitFile[]
13801380
** (meaning that id was named on the command-line).
13811381
**
13821382
** In the second form (3 arguments) return argument X if true and Y
1383
-** if false.
1383
+** if false. Except if Y is NULL then always return X.
13841384
*/
13851385
static void file_is_selected(
13861386
sqlite3_context *context,
13871387
int argc,
13881388
sqlite3_value **argv
@@ -1405,10 +1405,11 @@
14051405
if( argc==1 ){
14061406
sqlite3_result_int(context, rc);
14071407
}else{
14081408
assert( argc==3 );
14091409
assert( rc==0 || rc==1 );
1410
+ if( sqlite3_value_type(argv[2-rc])==SQLITE_NULL ) rc = 1-rc;
14101411
sqlite3_result_value(context, argv[2-rc]);
14111412
}
14121413
}
14131414
14141415
/*
14151416
--- src/db.c
+++ src/db.c
@@ -1378,11 +1378,11 @@
1378 ** named on the command line (g.aCommitFile is NULL meaning that all
1379 ** changes are to be committed) or if id is found in g.aCommitFile[]
1380 ** (meaning that id was named on the command-line).
1381 **
1382 ** In the second form (3 arguments) return argument X if true and Y
1383 ** if false.
1384 */
1385 static void file_is_selected(
1386 sqlite3_context *context,
1387 int argc,
1388 sqlite3_value **argv
@@ -1405,10 +1405,11 @@
1405 if( argc==1 ){
1406 sqlite3_result_int(context, rc);
1407 }else{
1408 assert( argc==3 );
1409 assert( rc==0 || rc==1 );
 
1410 sqlite3_result_value(context, argv[2-rc]);
1411 }
1412 }
1413
1414 /*
1415
--- src/db.c
+++ src/db.c
@@ -1378,11 +1378,11 @@
1378 ** named on the command line (g.aCommitFile is NULL meaning that all
1379 ** changes are to be committed) or if id is found in g.aCommitFile[]
1380 ** (meaning that id was named on the command-line).
1381 **
1382 ** In the second form (3 arguments) return argument X if true and Y
1383 ** if false. Except if Y is NULL then always return X.
1384 */
1385 static void file_is_selected(
1386 sqlite3_context *context,
1387 int argc,
1388 sqlite3_value **argv
@@ -1405,10 +1405,11 @@
1405 if( argc==1 ){
1406 sqlite3_result_int(context, rc);
1407 }else{
1408 assert( argc==3 );
1409 assert( rc==0 || rc==1 );
1410 if( sqlite3_value_type(argv[2-rc])==SQLITE_NULL ) rc = 1-rc;
1411 sqlite3_result_value(context, argv[2-rc]);
1412 }
1413 }
1414
1415 /*
1416

Keyboard Shortcuts

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