Skip to content

Commit eb5d9df

Browse files
committed
fix: fixed behavior of the Bytes_mul
1 parent 882717c commit eb5d9df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

argon/vm/datatype/bytes.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ ArObject *bytes_mul(const Bytes *left, const ArObject *right) {
12251225
std::shared_lock _(*l);
12261226

12271227
Bytes *ret;
1228-
if ((ret = BytesNew(BUFFER_LEN(l) * times, true, false, false)) != nullptr) {
1228+
if ((ret = BytesNew(BUFFER_LEN(l) * times, true, false, BUFFER_FROZEN(left))) != nullptr) {
12291229
while (times--)
12301230
argon::vm::memory::MemoryCopy(BUFFER_GET(ret) + (BUFFER_LEN(l) * times), BUFFER_GET(l), BUFFER_LEN(l));
12311231
}

0 commit comments

Comments
 (0)