From c2ee9733a451aab9dac6928f47d1c47e54da20b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Fri, 13 Jan 2023 07:58:34 +0100 Subject: [PATCH] Fix a compiler warning. [COMPILER] * BUG: Fix a compiler warning. --- main/gbc/gbc_type.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/gbc/gbc_type.c b/main/gbc/gbc_type.c index c6afec548..4dbda85cb 100644 --- a/main/gbc/gbc_type.c +++ b/main/gbc/gbc_type.c @@ -160,10 +160,12 @@ char *TYPE_get_desc(TYPE type) sprintf(buf, "%.*s", sym->symbol.len, sym->symbol.name); } } - else + else if (id < T_OBJECT) { strcpy(buf, TYPE_name[id]); } + else + *buf = 0; return buf; }