Fix crash when printing errors that are an unexpected type

This commit is contained in:
Jarred Sumner
2022-03-17 20:52:10 -07:00
parent e4f67a7fc9
commit 6b33912f42
2 changed files with 21 additions and 1 deletions

View File

@@ -1707,7 +1707,7 @@ pub const VirtualMachine = struct {
},
else => {
this.printErrorInstance(
@intToEnum(JSValue, @intCast(i64, (@ptrToInt(value)))),
@intToEnum(JSValue, @bitCast(JSValue.Type, (@ptrToInt(value)))),
exception_list,
Writer,
writer,