Skip to content

Commit f7be9af

Browse files
kantaiwileyj
authored andcommitted
fix: address issue in print eval
1 parent e53ba10 commit f7be9af

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to the versioning scheme outlined in the [README.md](README.md).
77

8+
## [2.4.0.0.4]
9+
10+
This is a high-priority hotfix that addresses a bug in transaction processing which
11+
could impact miner availability.
12+
813
## [2.4.0.0.3]
914

1015
This is a high-priority hotfix that addresses a bug in transaction processing which

clarity/src/vm/functions/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ macro_rules! switch_on_global_epoch {
6969

7070
use crate::vm::ClarityVersion;
7171

72+
use super::errors::InterpreterError;
73+
7274
mod arithmetic;
7375
mod assets;
7476
mod boolean;
@@ -606,7 +608,10 @@ fn special_print(
606608
env: &mut Environment,
607609
context: &LocalContext,
608610
) -> Result<Value> {
609-
let input = eval(&args[0], env, context)?;
611+
let arg = args.get(0).ok_or_else(|| {
612+
InterpreterError::BadSymbolicRepresentation("Print should have an argument".into())
613+
})?;
614+
let input = eval(arg, env, context)?;
610615

611616
runtime_cost(ClarityCostFunction::Print, env, input.size())?;
612617

0 commit comments

Comments
 (0)