Fossil SCM
Fix a bug in the manifest generator that was introduced by check-in [01e4de6b8ae936b].
Commit
5f3a0681a0e403ab66776378a1cf87f3237b1765
Parent
4d107b597a4c9eb…
1 file changed
+2
-1
M
src/db.c
+2
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1378,11 +1378,11 @@ | ||
| 1378 | 1378 | ** named on the command line (g.aCommitFile is NULL meaning that all |
| 1379 | 1379 | ** changes are to be committed) or if id is found in g.aCommitFile[] |
| 1380 | 1380 | ** (meaning that id was named on the command-line). |
| 1381 | 1381 | ** |
| 1382 | 1382 | ** 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. | |
| 1384 | 1384 | */ |
| 1385 | 1385 | static void file_is_selected( |
| 1386 | 1386 | sqlite3_context *context, |
| 1387 | 1387 | int argc, |
| 1388 | 1388 | sqlite3_value **argv |
| @@ -1405,10 +1405,11 @@ | ||
| 1405 | 1405 | if( argc==1 ){ |
| 1406 | 1406 | sqlite3_result_int(context, rc); |
| 1407 | 1407 | }else{ |
| 1408 | 1408 | assert( argc==3 ); |
| 1409 | 1409 | assert( rc==0 || rc==1 ); |
| 1410 | + if( sqlite3_value_type(argv[2-rc])==SQLITE_NULL ) rc = 1-rc; | |
| 1410 | 1411 | sqlite3_result_value(context, argv[2-rc]); |
| 1411 | 1412 | } |
| 1412 | 1413 | } |
| 1413 | 1414 | |
| 1414 | 1415 | /* |
| 1415 | 1416 |
| --- 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 |