File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -360,7 +360,9 @@ FUZZ_TARGET_INIT(rpc, initialize_rpc)
360360 rpc_testing_setup->CallRPC (rpc_command, arguments);
361361 } catch (const UniValue& json_rpc_error) {
362362 const std::string error_msg{find_value (json_rpc_error, " message" ).get_str ()};
363- if (error_msg.find (" Internal bug detected" ) != std::string::npos) {
363+ // Once c++20 is allowed, starts_with can be used.
364+ // if (error_msg.starts_with("Internal bug detected")) {
365+ if (0 == error_msg.rfind (" Internal bug detected" , 0 )) {
364366 // Only allow the intentional internal bug
365367 assert (error_msg.find (" trigger_internal_bug" ) != std::string::npos);
366368 }
Original file line number Diff line number Diff line change @@ -33,11 +33,11 @@ class NonFatalCheckError : public std::runtime_error
3333 do { \
3434 if (!(condition)) { \
3535 throw NonFatalCheckError ( \
36- strprintf (" %s:%d (%s) \n " \
37- " Internal bug detected: '%s' \n " \
36+ strprintf (" Internal bug detected: '%s' \n " \
37+ " %s:%d (%s) \n " \
3838 " You may report this issue here: %s\n " , \
39- __FILE__, __LINE__, __func__, \
4039 (#condition), \
40+ __FILE__, __LINE__, __func__, \
4141 PACKAGE_BUGREPORT)); \
4242 } \
4343 } while (false )
You can’t perform that action at this time.
0 commit comments