mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mrb_sym2name_len() should initialize lenp even when proper symbol does not exist
This commit is contained in:
@@ -148,6 +148,7 @@ MRB_API const char*
|
||||
mrb_sym2name_len(mrb_state *mrb, mrb_sym sym, mrb_int *lenp)
|
||||
{
|
||||
if (sym == 0 || mrb->symidx < sym) {
|
||||
if (lenp) *lenp = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user