#65·acwj

cg_arm.c in 19_Arrays_pt1 is out of sync

Author: vcheckzenCreated Jul 5, 2023Updated Jul 5, 2023

https://github.com/DoctorWkt/acwj/blob/14e9397369dcd428ee7ba6dcf290407403f4c4e7/19_Arrays_pt1/cg_arm.c#L82

https://github.com/DoctorWkt/acwj/blob/14e9397369dcd428ee7ba6dcf290407403f4c4e7/19_Arrays_pt1/cg_arm.c#L136

Both lines should be changed to

c
 if (Gsym[i].stype == S_VARIABLE || Gsym[i].stype == S_ARRAY)

https://github.com/DoctorWkt/acwj/blob/14e9397369dcd428ee7ba6dcf290407403f4c4e7/19_Arrays_pt1/cg_arm.c#L270-L271

should be changed to

c
 case 1:
 case 4:
    fprintf(Outfile, "%s:\n\t.zero\t%d\n", Gsym[id].name, Gsym[id].size * typesize);
    break;