Ver1.5 && fixed a bug caused by incorrect single-variable condition judgment && github link added
This commit is contained in:
parent
4909a1836a
commit
2af81a043c
@ -14,10 +14,10 @@ extern "C"
|
|||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
printf("\n\n");
|
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, "Auther: LuChiChick");
|
||||||
log_printf(LOG_SYS_INFO, "%s\n%s\n%s\n\n", "Open source links:",
|
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");
|
" └─Personal Git System: https://git.luchichick.cn/LuChiChick/SrcToA2L");
|
||||||
|
|
||||||
log_printf(LOG_SYS_INFO, "Start argument solve.\n\n");
|
log_printf(LOG_SYS_INFO, "Start argument solve.\n\n");
|
||||||
|
@ -367,8 +367,6 @@ variable_info solve_variable_info(const char *code_line_str)
|
|||||||
info.element_count = info.element_count * 10 + buff[n] - '0';
|
info.element_count = info.element_count * 10 + buff[n] - '0';
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 处理宏定义常量,暂时将不支持的量定义为1
|
|
||||||
|
|
||||||
// 提取宏字符串
|
// 提取宏字符串
|
||||||
char define_str[VARIABLE_NAME_STR_LENGTH_MAX] = {'\0'};
|
char define_str[VARIABLE_NAME_STR_LENGTH_MAX] = {'\0'};
|
||||||
for (int count = 0; count < VARIABLE_NAME_STR_LENGTH_MAX; count++)
|
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;
|
target_define_node = target_define_node->p_next;
|
||||||
}
|
}
|
||||||
// 遍历完成但没有找到
|
// 遍历完成但没有找到,元素长度设置为0
|
||||||
if (target_define_node == nullptr)
|
if (target_define_node == nullptr)
|
||||||
{
|
{
|
||||||
// printf("\n");
|
// printf("\n");
|
||||||
@ -404,7 +402,7 @@ variable_info solve_variable_info(const char *code_line_str)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buff[count] == ' ' || buff[count] == '=' || buff[count] == ';') // 是单个变量
|
if (buff[count] == '\0' || buff[count] == '=' || buff[count] == ';') // 是单个变量
|
||||||
{
|
{
|
||||||
info.element_count = 1;
|
info.element_count = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user