From e2d9741b6f9066a1037800afcd607c68fba56c93 Mon Sep 17 00:00:00 2001 From: Inori Date: Mon, 5 Aug 2019 13:53:03 -0400 Subject: [PATCH] Get ruby exceptions for null file handles --- README.md | 3 ++- src/filesystem.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6222065c..e763df24 100644 --- a/README.md +++ b/README.md @@ -288,7 +288,8 @@ If a requested font is not found, no error is generated. Instead, a built-in fon * Win32API calls outside of Windows (Win32API is just an alias to the MiniFFI class, which *does* work with other operating systems, but you can obviously only load libraries made for the platform you're on)* * Some Win32API calls don't play nicely with SDL. Building with the `fix_essentials` option will attempt to fix this. -* Sockets in Essentials. +* Sockets. +* Loading data from an archive doesn't work like a real IO, so Ruby doesn't like it when Essentials tries to load files from an archive. Yet. * Movie playback * wma audio files * Creating Bitmaps with sizes greater than the OpenGL texture size limit (around 8192 on modern cards)^ diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 70d50653..b3615ac5 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -689,7 +689,7 @@ void FileSystem::openReadRaw(SDL_RWops &ops, bool freeOnClose) { PHYSFS_File *handle = PHYSFS_openRead(filename); - assert(handle); + // assert(handle); // Ruby exceptions are a little more helpful initReadOps(handle, ops, freeOnClose); }