summaryrefslogtreecommitdiffhomepage
path: root/src/load.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/load.c')
-rw-r--r--src/load.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/load.c b/src/load.c
index 857dd7740..de517f89f 100644
--- a/src/load.c
+++ b/src/load.c
@@ -12,6 +12,7 @@
#include "mruby/proc.h"
#include "mruby/string.h"
#include "mruby/debug.h"
+#include "mruby/error.h"
#if !defined(_WIN32) && SIZE_MAX < UINT32_MAX
# define SIZE_ERROR_MUL(x, y) ((x) > SIZE_MAX / (y))
@@ -467,8 +468,7 @@ mrb_read_irep(mrb_state *mrb, const uint8_t *bin)
static void
irep_error(mrb_state *mrb)
{
- static const char msg[] = "irep load error";
- mrb->exc = mrb_obj_ptr(mrb_exc_new(mrb, E_SCRIPT_ERROR, msg, sizeof(msg) - 1));
+ mrb->exc = mrb_obj_ptr(mrb_exc_new_str_lit(mrb, E_SCRIPT_ERROR, "irep load error"));
}
mrb_value