Fossil SCM
Fix JSON assert in fossil_print_error() seen when an invalid repository is specified.
Commit
44cf2e91906e34faa429305a91908cd455b51aee1d39bb602f174fb7cefb6afc
Parent
e5293dc281b5a14…
1 file changed
+2
-2
+2
-2
| --- src/printf.c | ||
| +++ src/printf.c | ||
| @@ -1100,11 +1100,11 @@ | ||
| 1100 | 1100 | /* |
| 1101 | 1101 | ** Avoid calling into the JSON support subsystem if it |
| 1102 | 1102 | ** has not yet been initialized, e.g. early SQLite log |
| 1103 | 1103 | ** messages, etc. |
| 1104 | 1104 | */ |
| 1105 | - assert(json_is_bootstrapped_early()); | |
| 1105 | + if( !json_is_bootstrapped_early() ) json_bootstrap_early(); | |
| 1106 | 1106 | json_err( 0, z, 1 ); |
| 1107 | 1107 | if( g.isHTTP && !g.json.preserveRc ){ |
| 1108 | 1108 | rc = 0 /* avoid HTTP 500 */; |
| 1109 | 1109 | } |
| 1110 | 1110 | if( g.cgiOutput==1 ){ |
| @@ -1230,11 +1230,11 @@ | ||
| 1230 | 1230 | /* |
| 1231 | 1231 | ** Avoid calling into the JSON support subsystem if it |
| 1232 | 1232 | ** has not yet been initialized, e.g. early SQLite log |
| 1233 | 1233 | ** messages, etc. |
| 1234 | 1234 | */ |
| 1235 | - assert(json_is_bootstrapped_early()); | |
| 1235 | + if( !json_is_bootstrapped_early() ) json_bootstrap_early(); | |
| 1236 | 1236 | json_warn( FSL_JSON_W_UNKNOWN, "%s", z ); |
| 1237 | 1237 | }else |
| 1238 | 1238 | #endif |
| 1239 | 1239 | { |
| 1240 | 1240 | if( g.cgiOutput==1 ){ |
| 1241 | 1241 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -1100,11 +1100,11 @@ | |
| 1100 | /* |
| 1101 | ** Avoid calling into the JSON support subsystem if it |
| 1102 | ** has not yet been initialized, e.g. early SQLite log |
| 1103 | ** messages, etc. |
| 1104 | */ |
| 1105 | assert(json_is_bootstrapped_early()); |
| 1106 | json_err( 0, z, 1 ); |
| 1107 | if( g.isHTTP && !g.json.preserveRc ){ |
| 1108 | rc = 0 /* avoid HTTP 500 */; |
| 1109 | } |
| 1110 | if( g.cgiOutput==1 ){ |
| @@ -1230,11 +1230,11 @@ | |
| 1230 | /* |
| 1231 | ** Avoid calling into the JSON support subsystem if it |
| 1232 | ** has not yet been initialized, e.g. early SQLite log |
| 1233 | ** messages, etc. |
| 1234 | */ |
| 1235 | assert(json_is_bootstrapped_early()); |
| 1236 | json_warn( FSL_JSON_W_UNKNOWN, "%s", z ); |
| 1237 | }else |
| 1238 | #endif |
| 1239 | { |
| 1240 | if( g.cgiOutput==1 ){ |
| 1241 |
| --- src/printf.c | |
| +++ src/printf.c | |
| @@ -1100,11 +1100,11 @@ | |
| 1100 | /* |
| 1101 | ** Avoid calling into the JSON support subsystem if it |
| 1102 | ** has not yet been initialized, e.g. early SQLite log |
| 1103 | ** messages, etc. |
| 1104 | */ |
| 1105 | if( !json_is_bootstrapped_early() ) json_bootstrap_early(); |
| 1106 | json_err( 0, z, 1 ); |
| 1107 | if( g.isHTTP && !g.json.preserveRc ){ |
| 1108 | rc = 0 /* avoid HTTP 500 */; |
| 1109 | } |
| 1110 | if( g.cgiOutput==1 ){ |
| @@ -1230,11 +1230,11 @@ | |
| 1230 | /* |
| 1231 | ** Avoid calling into the JSON support subsystem if it |
| 1232 | ** has not yet been initialized, e.g. early SQLite log |
| 1233 | ** messages, etc. |
| 1234 | */ |
| 1235 | if( !json_is_bootstrapped_early() ) json_bootstrap_early(); |
| 1236 | json_warn( FSL_JSON_W_UNKNOWN, "%s", z ); |
| 1237 | }else |
| 1238 | #endif |
| 1239 | { |
| 1240 | if( g.cgiOutput==1 ){ |
| 1241 |