Skip to content

Commit

Permalink
Rename load_c_string => load_c_string_byte_by_byte
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Jan 17, 2025
1 parent 8e0553f commit fd52507
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions script/src/syscalls/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use ckb_traits::CellDataProvider;
use ckb_types::core::cell::{CellMeta, ResolvedTransaction};
use ckb_types::core::error::ARGV_TOO_LONG_TEXT;
use ckb_types::packed::{Bytes as PackedBytes, BytesVec};
use ckb_vm::memory::load_c_string;
use ckb_vm::memory::load_c_string_byte_by_byte;
use ckb_vm::Memory;
use ckb_vm::DEFAULT_MEMORY_SIZE;
use ckb_vm::{
Expand Down Expand Up @@ -169,7 +169,7 @@ impl<Mac: SupportMachine, DL: CellDataProvider + Send + Sync> Syscalls<Mac> for
let mut argv_length: u64 = 0;
for _ in 0..argc {
let target_addr = machine.memory_mut().load64(&Mac::REG::from_u64(addr))?;
let cstr = load_c_string(machine.memory_mut(), &target_addr)?;
let cstr = load_c_string_byte_by_byte(machine.memory_mut(), &target_addr)?;
let cstr_len = cstr.len();
argv.push(cstr);

Expand Down

0 comments on commit fd52507

Please sign in to comment.