symbol.c (sym_inline_pack): set pack_length_max to 4

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-01-28 13:49:12 +09:00
parent fc16f9dd13
commit 3e6abfd21c
-5
View File
@@ -73,12 +73,7 @@ static const char pack_table[] = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRS
static mrb_sym
sym_inline_pack(const char *name, size_t len)
{
#if defined(MRB_WORD_BOXING) && defined(MRB_32BIT) && !defined(MRB_WORDBOX_NO_FLOAT_TRUNCATE)
const size_t pack_length_max = 4;
#else
const size_t pack_length_max = 5;
#endif
mrb_sym sym = 0;
if (len > pack_length_max) return 0; /* too long */