diff --git a/Src/Main.cpp b/Src/Main.cpp index c0847eb..782366d 100644 --- a/Src/Main.cpp +++ b/Src/Main.cpp @@ -14,10 +14,10 @@ extern "C" int main(int argc, char *argv[]) { printf("\n\n"); - log_printf(LOG_SYS_INFO, "SrcToA2L Ver1.4"); + log_printf(LOG_SYS_INFO, "SrcToA2L Ver1.5"); log_printf(LOG_SYS_INFO, "Auther: LuChiChick"); log_printf(LOG_SYS_INFO, "%s\n%s\n%s\n\n", "Open source links:", - " ├─Github: https://git.luchichick.cn/LuChiChick/SrcToA2L", + " ├─Github: https://github.com/LuChiChick/SrcToA2L", " └─Personal Git System: https://git.luchichick.cn/LuChiChick/SrcToA2L"); log_printf(LOG_SYS_INFO, "Start argument solve.\n\n"); diff --git a/Src/Tool_Functions.cpp b/Src/Tool_Functions.cpp index e5b1c4b..61729c3 100644 --- a/Src/Tool_Functions.cpp +++ b/Src/Tool_Functions.cpp @@ -367,8 +367,6 @@ variable_info solve_variable_info(const char *code_line_str) info.element_count = info.element_count * 10 + buff[n] - '0'; else { - // 处理宏定义常量,暂时将不支持的量定义为1 - // 提取宏字符串 char define_str[VARIABLE_NAME_STR_LENGTH_MAX] = {'\0'}; for (int count = 0; count < VARIABLE_NAME_STR_LENGTH_MAX; count++) @@ -389,7 +387,7 @@ variable_info solve_variable_info(const char *code_line_str) } target_define_node = target_define_node->p_next; } - // 遍历完成但没有找到 + // 遍历完成但没有找到,元素长度设置为0 if (target_define_node == nullptr) { // printf("\n"); @@ -404,7 +402,7 @@ variable_info solve_variable_info(const char *code_line_str) break; } - if (buff[count] == ' ' || buff[count] == '=' || buff[count] == ';') // 是单个变量 + if (buff[count] == '\0' || buff[count] == '=' || buff[count] == ';') // 是单个变量 { info.element_count = 1; break;