fix memory bug occuring in debug mode and attempting to fix another

This commit is contained in:
William Bell
2025-11-11 02:30:14 +00:00
parent 434b0ed99e
commit 608fd86003
7 changed files with 47 additions and 39 deletions

View File

@@ -55,9 +55,13 @@ ArgonObject *create_ARGON_DICTIONARY_TYPE___string__(size_t argc,
string_length += length;
for (size_t i = 0; i < keys_length; i++) {
struct node_GC* node = keys[i];
if (!node) { fprintf(stderr, "NULL node at %zu\n", i); continue; }
ArgonObject *key = node->key;
ArgonObject *value = node->val;
if (!key) { fprintf(stderr, "NULL key at node %zu\n", i); continue; }
if (!value) { fprintf(stderr, "NULL value at node %zu\n", i); continue; }
ArgonObject *string_convert_method = get_builtin_field_for_class(
get_builtin_field(key, __class__), __repr__, key);