Fix null values for local const in debugger

This commit is contained in:
scrawach 2026-01-31 23:19:26 +03:00
parent 89cea14398
commit f45bf82ae7
3 changed files with 10 additions and 1 deletions

View file

@ -200,6 +200,9 @@ GDScriptFunction *GDScriptByteCodeGenerator::write_end() {
for (const KeyValue<Variant, int> &K : constant_map) {
function->constants.write[K.value] = K.key;
}
for (const KeyValue<StringName, int> &K : local_constants) {
function->constant_map.insert(K.key, function->constants[K.value]);
}
} else {
function->_constants_ptr = nullptr;
function->_constant_count = 0;