mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-10 08:55:33 +02:00
Make sure load_data returns a string
This commit is contained in:
parent
e44135e87d
commit
5a4c8dc87c
1 changed files with 6 additions and 1 deletions
|
@ -183,7 +183,12 @@ RB_METHOD(kernelLoadData)
|
||||||
rb_str_new2("Graphics"));
|
rb_str_new2("Graphics"));
|
||||||
|
|
||||||
if (isGraphicsFile == Qtrue)
|
if (isGraphicsFile == Qtrue)
|
||||||
return rb_file_open_str(filename, "rb");
|
{
|
||||||
|
VALUE f = rb_file_open_str(filename, "rb");
|
||||||
|
VALUE ret = rb_funcall(f, rb_intern("read"), 0);
|
||||||
|
rb_funcall(f, rb_intern("close"), 0);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return kernelLoadDataInt(RSTRING_PTR(filename), true);
|
return kernelLoadDataInt(RSTRING_PTR(filename), true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue