mirror of
https://github.com/bradgrantham/apple2a.git
synced 2025-03-18 09:31:03 +00:00
Add only one terminating nul, not three.
This commit is contained in:
parent
38a15160ed
commit
e2199b66fe
7
main.c
7
main.c
@ -323,7 +323,7 @@ static uint8_t *skip_whitespace(uint8_t *s) {
|
||||
|
||||
/**
|
||||
* Tokenize a string in place. Returns (and removes) any line number, or 0xFFFF
|
||||
* if there's none. The new line will be terminated by three nuls.
|
||||
* if there's none.
|
||||
*/
|
||||
static uint16_t tokenize(uint8_t *s) {
|
||||
uint8_t *t = s; // Tokenized version.
|
||||
@ -367,10 +367,7 @@ static uint16_t tokenize(uint8_t *s) {
|
||||
}
|
||||
}
|
||||
|
||||
// End with three nuls. The first is the end of line.
|
||||
// The next two is the address of the next line, which is "none".
|
||||
*t++ = '\0';
|
||||
*t++ = '\0';
|
||||
// Terminate string.
|
||||
*t++ = '\0';
|
||||
|
||||
return line_number;
|
||||
|
Loading…
x
Reference in New Issue
Block a user