Fixed wrong type of var get in function rot8_io.c/read_type

This commit is contained in:
starcells committed 2026-06-19 22:25:58 +08:00
1 parent 853a6c50d9
commit e91b01c7d4
2 files changed
+2 -1

No files matched your search

BIN
View File
Binary file not shown.
+2 -1
View File
@@ -20,7 +20,8 @@ void read_tape(const char *filename, char *tape) {
FILE *fp = fopen(filename, "r");
char get;
int get; // Attention, the return value of fgetc's type is int!!!
// On ARM, char <=> unsigned char,if "char get",EOF(-1) will assign 255 to "get",making the comparison always TRUE
while ((get = fgetc(fp)) != EOF) {
if (strchr("><+-[].,", get) != NULL) {
*tail = get;