stacks-network / clarity-wasm

`clar2wasm` is a compiler for generating WebAssembly from Clarity.
GNU General Public License v3.0
12 stars 9 forks source link

`replace-at?` should check for the size of the replacement element #418

Closed Acaccia closed 3 weeks ago

Acaccia commented 1 month ago

replace-at? replacement element should be a single element, for example a (string-ascii 1).

However, it seems that using en empty element doesn't provoke an error.

Examples of Clarity snippets that shouldn't work:

(replace-at? "abc" u2 "")
(replace-at? 0x1234 u1 0x)