FIXED: number_chars(N, "0' "), addressing #1580.
There may be a more elegant way to solve this.
This commit is contained in:
@@ -834,6 +834,26 @@ impl MachineState {
|
||||
) -> CallResult {
|
||||
let nx = self.store(self.deref(self.registers[2]));
|
||||
|
||||
let mut charcode_space = false;
|
||||
let mut cs = string.chars();
|
||||
|
||||
loop {
|
||||
let c = cs.next();
|
||||
|
||||
if c == None {
|
||||
break;
|
||||
}
|
||||
|
||||
if c == Some('0')
|
||||
&& cs.next() == Some('\'')
|
||||
&& cs.next() == Some(' ')
|
||||
&& cs.next() == None {
|
||||
charcode_space = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if !charcode_space {
|
||||
if let Some(c) = string.chars().last() {
|
||||
if layout_char!(c) {
|
||||
let (line_num, col_num) = string.chars().fold((0, 0), |(line_num, col_num), c| {
|
||||
@@ -849,6 +869,7 @@ impl MachineState {
|
||||
return Err(self.error_form(err, stub_gen()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mut dot_buf: [u8; '.'.len_utf8()] = [0u8];
|
||||
'.'.encode_utf8(&mut dot_buf);
|
||||
|
||||
Reference in New Issue
Block a user