From 457af2015b058c8a9476e9af7d1f52258b148a57 Mon Sep 17 00:00:00 2001 From: Zakarya Date: Fri, 28 Feb 2025 12:32:33 -0800 Subject: [PATCH] get_null() was wrong --- addons/bson/bson.gd | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/addons/bson/bson.gd b/addons/bson/bson.gd index f92c265..6dd6a3e 100644 --- a/addons/bson/bson.gd +++ b/addons/bson/bson.gd @@ -191,9 +191,6 @@ class Deserializer: func get_bool() -> bool: return (get_int8() == 1) - func get_null() -> void: - read_position += 1 - func read_dictionary() -> Dictionary: var object = {} @@ -220,9 +217,7 @@ class Deserializer: 0x08: object[key] = get_bool() 0x04: object[key] = read_array() 0x03: object[key] = read_dictionary() - 0x0a: - object[key] = null - get_null() + 0x0a: object[key] = null _: push_error("BSON deserialization error: Unsupported type " + str(type) @@ -270,9 +265,7 @@ class Deserializer: 0x08: array.append(get_bool()) 0x04: array.append(read_array()) 0x03: array.append(read_dictionary()) - 0x0a: - array.append(null) - get_null() + 0x0a: array.append(null) _: push_error("BSON deserialization error: Unsupported type: " + str(type)) if iter > expected_size: push_warning("BSON deserialization warning: Array is the wrong length."