I can’t understand why the first value that I add to the last is not the true value
void process_data_directive(struct as_tree *node, char *line) { struct string_sep_result ssr = {0}; // Initialize ssr to avoid any uninitialized memory issues int count = get_dir_data_val(line, &ssr); if (count == -1) { snprintf(node->error, sizeof(node->error), “Error: Invalid number in .data directive.”); return; } // Initialize the array to zero to ensure no leftover values memset(node->dir.operand_type.number, 0, sizeof(node->dir.operand_type.number)); […]
i cant understand why the first value that i add to the ast is not the true value
void process_data_directive(struct as_tree *node, char *line) {
struct string_sep_result ssr = {0}; // Initialize ssr to avoid any uninitialized memory issues
int count = get_dir_data_val(line, &ssr);
if (count == -1) {
snprintf(node->error, sizeof(node->error), “Error: Invalid number in .data directive.”);
return;
}