summaryrefslogtreecommitdiff
path: root/kc
diff options
context:
space:
mode:
Diffstat (limited to 'kc')
-rw-r--r--kc/core/kprint.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kc/core/kprint.c b/kc/core/kprint.c
index 18b5af9..70010ea 100644
--- a/kc/core/kprint.c
+++ b/kc/core/kprint.c
@@ -148,7 +148,9 @@ static struct specifier parse_specifier(const char *format, va_list arguments)
// step 3: check for type width arguments
switch (*begin)
- {
+ case 0: // unexpected eos
+ result.type = INVALID_PRINT;
+ return result;
case 'h':
{
if (begin[0] == begin[1])