mrb_sym2name_len() should initialize lenp even when proper symbol does not exist

This commit is contained in:
Yukihiro "Matz" Matsumoto
2014-09-30 22:46:19 +09:00
parent 7a7dcd12e5
commit bbf24b8463
+1
View File
@@ -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;
}