Skip to content

Commit f64086f

Browse files
committed
Fix 1 warning and 1 bug.
1 parent 452932a commit f64086f

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

py/lexer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ static void mp_lexer_next_token_into(mp_lexer_t *lex, mp_token_t *tok, bool firs
471471
case 'r': c = 0x0d; break;
472472
case 'x':
473473
{
474-
uint num;
474+
uint num = 0;
475475
if (!get_hex(lex, 2, &num)) {
476476
// TODO error message
477477
assert(0);

py/vstr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ void vstr_cut_tail(vstr_t *vstr, int len) {
190190
} else {
191191
vstr->len -= len;
192192
}
193+
vstr->buf[vstr->len] = 0;
193194
}
194195

195196
void vstr_printf(vstr_t *vstr, const char *fmt, ...) {

0 commit comments

Comments
 (0)