Change the n argument of lexer_shift_buffer to size_t from int
Some checks failed
Validate the build / validate-build (push) Failing after 35s
Some checks failed
Validate the build / validate-build (push) Failing after 35s
This commit is contained in:
parent
1a79bf050e
commit
6f78d26ea1
@ -136,7 +136,7 @@ error_t *lexer_open(lexer_t *lex, char *path) {
|
|||||||
*
|
*
|
||||||
* @pre There must be at least n characters in the input buffer
|
* @pre There must be at least n characters in the input buffer
|
||||||
*/
|
*/
|
||||||
void lexer_shift_buffer(lexer_t *lex, int n) {
|
void lexer_shift_buffer(lexer_t *lex, size_t n) {
|
||||||
assert(lex->buffer_count >= n);
|
assert(lex->buffer_count >= n);
|
||||||
lex->buffer_count -= n;
|
lex->buffer_count -= n;
|
||||||
memmove(lex->buffer, lex->buffer + n, lex->buffer_count);
|
memmove(lex->buffer, lex->buffer + n, lex->buffer_count);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user