mirror of
https://github.com/mkxp-z/mkxp-z.git
synced 2025-08-21 06:15:52 +02:00
Fix loading from encrypted archives (RGSSADs)
This commit is contained in:
parent
38595cc31d
commit
f608a94fb7
1 changed files with 3 additions and 7 deletions
|
@ -135,14 +135,7 @@ kernelLoadDataInt(const char *filename, bool rubyExc)
|
|||
{
|
||||
rb_gc_start();
|
||||
|
||||
#ifndef OLD_RUBY
|
||||
VALUE port = fileIntForPath(filename, rubyExc);
|
||||
#else
|
||||
// the above results in an uninitialized IO,
|
||||
// so let's use Ruby to open the file instead
|
||||
// hopefully a temporary fix
|
||||
VALUE port = rb_file_open_str(rb_str_new2(filename), "rb");
|
||||
#endif
|
||||
|
||||
VALUE marsh = rb_const_get(rb_cObject, rb_intern("Marshal"));
|
||||
|
||||
|
@ -234,6 +227,9 @@ fileIntBindingInit()
|
|||
|
||||
_rb_define_method(klass, "read", fileIntRead);
|
||||
_rb_define_method(klass, "getbyte", fileIntGetByte);
|
||||
#ifdef OLD_RUBY // Marshal looks for 'getc', not 'getbyte'
|
||||
rb_define_alias(klass, "getc", "getbyte");
|
||||
#endif
|
||||
_rb_define_method(klass, "binmode", fileIntBinmode);
|
||||
_rb_define_method(klass, "close", fileIntClose);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue