mirror of
https://github.com/DoneJS-Runtime/quickjs-done-nextgen.git
synced 2025-01-09 17:43:15 +00:00
Fix UndefinedBehaviorSanitizer error
UBSan is right to complain that `s->ptr_last == NULL` when tracing is disabled.
This commit is contained in:
parent
62f4713780
commit
4fbce79521
1 changed files with 2 additions and 1 deletions
|
@ -35019,6 +35019,7 @@ static JSValue JS_ReadFunctionTag(BCReaderState *s)
|
|||
goto fail;
|
||||
if (b->source_len) {
|
||||
bc_read_trace(s, "source: %d bytes\n", b->source_len);
|
||||
if (s->ptr_last)
|
||||
s->ptr_last += b->source_len; // omit source code hex dump
|
||||
/* b->source is a UTF-8 encoded null terminated C string */
|
||||
b->source = js_mallocz(ctx, b->source_len + 1);
|
||||
|
|
Loading…
Reference in a new issue