summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xmrbgems/mruby-bin-debugger/tools/mrdb/apilist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
index 53f5fe4ef..20378522f 100755
--- a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
+++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c
@@ -75,6 +75,7 @@ dirname(mrb_state *mrb, const char *path)
if ((dir = mrb_malloc(mrb, len + 1)) != NULL) {
strncpy(dir, path, len);
+ dir[len] = '\0';
}
return dir;
}