Skip to content

Commit 9f4aedb

Browse files
committed
Fix compilation on linux-aarch64 hosts
This is cause due to ffi:c_char being u8 instead of i8 like x86_64.
1 parent 499671b commit 9f4aedb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/codegen/mos6502.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,10 +505,10 @@ pub unsafe fn parse_addr_or_label(line_begin: *const c_char, mut line: *const c_
505505
asm: *mut Assembler) -> (Address, *const c_char) {
506506
while isspace(*line as i32) != 0 {line = line.add(1);}
507507

508-
let (v, mut end) = match *line as u8 {
509-
c if is_identifier_start(c as i8) => {
508+
let (v, mut end) = match *line {
509+
c if is_identifier_start(c) => {
510510
let start = line;
511-
while is_identifier(*line as i8) {line = line.add(1);}
511+
while is_identifier(*line) {line = line.add(1);}
512512
let len = line as isize - start as isize;
513513

514514
let label = arena::sprintf(&mut (*asm).string_arena, c!("%.*s"), len, start);
@@ -557,7 +557,7 @@ pub unsafe fn assemble_statement(out: *mut String_Builder,
557557
}
558558

559559
for i in 0..len {
560-
*name.add(i) = toupper(*name.add(i) as i32) as i8;
560+
*name.add(i) = toupper(*name.add(i) as i32) as c_char;
561561
}
562562
let instr = match instr_from_string(name) {
563563
Some(v) => v,

0 commit comments

Comments
 (0)