(uxnasm) endian-agnostic handling of symbols file writing
This commit is contained in:
parent
0f68e08688
commit
5e1c896554
|
@ -444,8 +444,9 @@ writesym(char *filename)
|
||||||
fp = fopen(scat(scpy(filename, symdst, slen(filename) + 1), ".sym"), "w");
|
fp = fopen(scat(scpy(filename, symdst, slen(filename) + 1), ".sym"), "w");
|
||||||
if(fp != NULL) {
|
if(fp != NULL) {
|
||||||
for(i = 0; i < p.llen; i++) {
|
for(i = 0; i < p.llen; i++) {
|
||||||
fwrite(&p.labels[i].addr + 1, 1, 1, fp);
|
Uint8 hb = p.labels[i].addr >> 8, lb = p.labels[i].addr & 0xff;
|
||||||
fwrite((Uint8*)&p.labels[i].addr, 1, 1, fp);
|
fwrite(&hb, 1, 1, fp);
|
||||||
|
fwrite(&lb, 1, 1, fp);
|
||||||
fwrite(p.labels[i].name, slen(p.labels[i].name) + 1, 1, fp);
|
fwrite(p.labels[i].name, slen(p.labels[i].name) + 1, 1, fp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue