Fix extension soft lock when inspecting Dictionary variables with Variant key types (#854)

Co-authored-by: Pawel Miniszewski <pawel.miniszewski@gmail.com>
This commit is contained in:
EF
2025-05-11 22:28:23 +02:00
committed by GitHub
parent af6df23306
commit 29734ea849
2 changed files with 4 additions and 0 deletions

View File

@@ -210,6 +210,9 @@ export class VariantDecoder {
private decode_ContainerTypeFlag(model: BufferModel, type: GDScriptTypes, bitOffset: number) {
const shiftedType = (type >> bitOffset) & 0b11;
if (shiftedType === ContainerTypeFlags.NONE) {
return 0;
}
if (shiftedType === ContainerTypeFlags.BUILTIN) {
return this.decode_UInt32(model);
} else {

View File

@@ -58,6 +58,7 @@ export const ENCODE_FLAG_TYPED_ARRAY_MASK = 0b11 << 16;
export const ENCODE_FLAG_TYPED_DICT_MASK = 0b1111 << 16;
export enum ContainerTypeFlags {
NONE = 0,
BUILTIN = 1,
CLASS_NAME = 2,
SCRIPT = 3,