Skip to content

Commit 29734ea

Browse files
pminiszewskiPawel Miniszewski
andauthored
Fix extension soft lock when inspecting Dictionary variables with Variant key types (#854)
Co-authored-by: Pawel Miniszewski <pawel.miniszewski@gmail.com>
1 parent af6df23 commit 29734ea

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/debugger/godot4/variables/variant_decoder.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ export class VariantDecoder {
210210

211211
private decode_ContainerTypeFlag(model: BufferModel, type: GDScriptTypes, bitOffset: number) {
212212
const shiftedType = (type >> bitOffset) & 0b11;
213+
if (shiftedType === ContainerTypeFlags.NONE) {
214+
return 0;
215+
}
213216
if (shiftedType === ContainerTypeFlags.BUILTIN) {
214217
return this.decode_UInt32(model);
215218
} else {

src/debugger/godot4/variables/variants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export const ENCODE_FLAG_TYPED_ARRAY_MASK = 0b11 << 16;
5858
export const ENCODE_FLAG_TYPED_DICT_MASK = 0b1111 << 16;
5959

6060
export enum ContainerTypeFlags {
61+
NONE = 0,
6162
BUILTIN = 1,
6263
CLASS_NAME = 2,
6364
SCRIPT = 3,

0 commit comments

Comments
 (0)