> 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
 10:47:02 up 14:44,  2 users,  load average: 0.57, 0.21, 0.16
This commit is contained in:
tracer-ics2023
2024-08-18 10:47:02 +08:00
committed by zzy
parent 65d59bf44f
commit 9b06b0abe0

View File

@ -176,6 +176,10 @@ word_t eval(const Token* arr, size_t p, size_t q, bool* success) {
* For now this token should be a number.
* Return the value of the number.
*/
if (arr[p].type != TK_DEC) {
*success = false;
return 0;
}
return atoi(arr[p].str);
}
else if (parten == 0) {