From 7cfddd06649c08c9dc10c65071ba71910e3de4aa Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Mon, 3 Nov 2025 18:29:10 +0100 Subject: [PATCH] fixed DataView resizing --- quickjs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/quickjs.c b/quickjs.c index 1930c5d..b4020d0 100644 --- a/quickjs.c +++ b/quickjs.c @@ -55360,7 +55360,12 @@ static void js_array_buffer_update_typed_arrays(JSArrayBuffer *abuf) ta = list_entry(el, JSTypedArray, link); p = ta->obj; if (p->class_id == JS_CLASS_DATAVIEW) { - continue; + if (ta->track_rab) { + if (ta->offset < len) + ta->length = len - ta->offset; + else + ta->length = 0; + } } else { p->u.array.count = 0; p->u.array.u.ptr = NULL;