Skip to content

Commit 54adb90

Browse files
flamenco: fix custom err default
1 parent 81dd267 commit 54adb90

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
40bf836f7e741203f05c9e9b4f11c9aca3cc9a4d
1+
b80c2beb881bb1dd5c296f7d564849dabc8c32ee

src/flamenco/log_collector/fd_log_collector.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ fd_log_collector_program_failure( fd_exec_instr_ctx_t * ctx ) {
465465
char custom_err[33] = { 0 };
466466
const char * err = custom_err;
467467
const fd_exec_txn_ctx_t * txn_ctx = ctx->txn_ctx;
468-
if( txn_ctx->custom_err != UINT_MAX ) {
468+
if( FD_UNLIKELY( txn_ctx->custom_err!=0U ) ) {
469469
/* Max msg_sz = 32 <= 66 */
470470
snprintf( custom_err, sizeof(custom_err), "custom program error: 0x%x", txn_ctx->custom_err );
471471
} else if( txn_ctx->exec_err ) {

src/flamenco/runtime/context/fd_exec_txn_ctx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ void
176176
fd_exec_txn_ctx_setup_basic( fd_exec_txn_ctx_t * ctx ) {
177177
fd_compute_budget_details_new( &ctx->compute_budget_details );
178178

179-
ctx->custom_err = UINT_MAX;
179+
ctx->custom_err = 0U;
180180
ctx->instr_stack_sz = 0;
181181
ctx->accounts_cnt = 0UL;
182182
ctx->executable_cnt = 0UL;

0 commit comments

Comments
 (0)