Merge pull request #6462 from dearblue/mruby-io

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-01-02 21:55:17 +09:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -381,7 +381,7 @@ mrb_file__gethome(mrb_state *mrb, mrb_value klass)
char *pathp = RSTRING_PTR(path);
const char *const pathend = pathp + RSTRING_LEN(path);
for (;;) {
pathp = memchr((void*)pathp, '\\', (size_t)(pathend - pathp));
pathp = (char*)memchr((void*)pathp, '\\', (size_t)(pathend - pathp));
if (!pathp) break;
*pathp++ = '/';
}
+1 -1
View File
@@ -257,7 +257,7 @@ mrb_mruby_io_gem_test(mrb_state* mrb)
char *pathp = RSTRING_PTR(path);
const char *const pathend = pathp + RSTRING_LEN(path);
for (;;) {
pathp = memchr(pathp, '\\', pathend - pathp);
pathp = (char*)memchr(pathp, '\\', pathend - pathp);
if (!pathp) break;
*pathp++ = '/';
}