LocalJumpError message contained garbage characters

This commit is contained in:
Kazuki Tsujimoto
2012-05-04 18:18:54 +09:00
parent 5a6193ffdd
commit 1c2f37434b
+1 -1
View File
@@ -268,7 +268,7 @@ localjump_error(mrb_state *mrb, const char *kind)
mrb_value exc;
snprintf(buf, 256, "unexpected %s", kind);
exc = mrb_exc_new(mrb, E_LOCALJUMP_ERROR, buf, sizeof(buf));
exc = mrb_exc_new(mrb, E_LOCALJUMP_ERROR, buf, strlen(buf));
mrb->exc = mrb_object(exc);
}