> compile NEMU
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 09:22:17 up 13:21, 2 users, load average: 0.36, 0.22, 0.19
This commit is contained in:
@ -166,10 +166,10 @@ int check_parentheses(const Token* arr, size_t p, size_t q) {
|
||||
}
|
||||
|
||||
word_t eval(const Token* arr, size_t p, size_t q, bool* success) {
|
||||
Assert (p >= 0 && p < q && q < nr_token, "invalid range on eval, "\
|
||||
Assert (p >= 0 && q < nr_token, "invalid range on eval, "\
|
||||
"p = %"PRIuMAX", q = %"PRIuMAX"\n", p, q);
|
||||
int parten = check_parentheses(arr, p, q);
|
||||
if (parten == -1) {
|
||||
if (parten == -1 || p > q) {
|
||||
*success = false;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user