summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/error.c b/error.c
index 9b93e2694f..bb1ffa4e7d 100644
--- a/error.c
+++ b/error.c
@@ -416,7 +416,7 @@ static const char builtin_types[][10] = {
"", /* 0x17 */
"", /* 0x18 */
"", /* 0x19 */
- {}, /* 0x1a */
+ "", /* 0x1a */
"undef", /* internal use: #undef; should not happen */
"Node", /* internal use: syntax tree node */
"iClass", /* internal use: mixed-in module holder */
@@ -426,7 +426,7 @@ const char *
rb_builtin_type_name(int t)
{
const char *name;
- if ((unsigned int)t > numberof(builtin_types)) return 0;
+ if ((unsigned int)t >= numberof(builtin_types)) return 0;
name = builtin_types[t];
if (*name) return name;
return 0;