aboutsummaryrefslogtreecommitdiffstats
path: root/src/tok.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tok.c')
-rw-r--r--src/tok.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tok.c b/src/tok.c
index 9b57459..e6b385d 100644
--- a/src/tok.c
+++ b/src/tok.c
@@ -236,6 +236,8 @@ static void sub_match_header(void)
void tok_reset(FILE *f)
{
+ assert(f != NULL);
+
curf = f;
curtok.line = 1;
curtok.col = 1;
@@ -252,7 +254,7 @@ struct tok_s tok_get(void)
if (unget) {
unget = false;
return curtok;
- }
+ }
curtok.col += vlen;
vlen = 0;