Merge pull request #95 from k-tsj/fix-localjumperror-message

LocalJumpError message contained garbage characters
This commit is contained in:
Yukihiro "Matz" Matsumoto
2012-05-04 05:03:43 -07:00
+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);
}