From 6d6beda20efb21528da8771aa8862d1a39a3e54a Mon Sep 17 00:00:00 2001 From: Partho Date: Sun, 4 May 2025 15:17:40 -0400 Subject: [PATCH] added more extra cases for get prim size --- src/symbol_table.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/symbol_table.c b/src/symbol_table.c index e1a63aa..139785a 100644 --- a/src/symbol_table.c +++ b/src/symbol_table.c @@ -120,6 +120,14 @@ int getPrimSize(TableNode *definition) { //special case to return size for reference to an array return 8; } + if(getAdInfoType(definition) == TYPE_FUNCTION_TYPE){ + //special case to return size for reference to a function + return 8; + } + if(getAdInfoType(definition) == TYPE_RECORD_TYPE){ + //special case to return size for reference to a record + return getRecTotal(definition); + } if (definition->additionalinfo == NULL) { printdebug("node has NULL additionalinfo. Invalid."); return -1;