由于需求变动,修改了配置文件读取函数

This commit is contained in:
2022-05-22 14:31:10 +08:00
parent 01a5f8a289
commit 3cbe4e07ab
3 changed files with 9 additions and 8 deletions

View File

@@ -69,14 +69,15 @@ rail_node_t *ReadConfigFile()
p++;
}
if (*p == '1' && *(p + 1) != '\n')
{
total_station = 10;
}
else if (*(p + 1) == '\n')
// 讲道理,应该只有两位数,所以就这样处理了
if (*(p + 1) == '\n')
{
total_station = *p - 48;
}
else
{
total_station = (*p - 48) * 10 + *(p + 1) - 48;
}
break;
case 'S':