You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Ruby 1.9, string indexing was changed to return codepoints rather than bytes, so the != 0x2F check never fires. I believe this patch should fix it on both vanilla Game.exe and MKXP:
diff --git a/Data/Scripts/009_Objects and windows/008_AnimatedBitmap.rb b/Data/Scripts/009_Objects and windows/008_AnimatedBitmap.rb
index dbad67c..530b0ed 100644
--- a/Data/Scripts/009_Objects and windows/008_AnimatedBitmap.rb
+++ b/Data/Scripts/009_Objects and windows/008_AnimatedBitmap.rb
@@ -196,8 +196,10 @@ class GifBitmap
rescue
bitmap = nil
end
+
if !bitmap || (bitmap.width == 32 && bitmap.height == 32)
- if !file || file.length < 1 || file[file.length - 1] != 0x2F
+ lastchar = file[file.length - 1]
+ if !file || file.length < 1 || (lastchar != 0x2F && lastchar != "/")
if (filestring = pbGetFileChar(file))
filestrName = file
elsif (filestring = pbGetFileChar(file + ".gif"))
Apologies if it's a bit of a hack, I'm not too familiar with Ruby.
The text was updated successfully, but these errors were encountered:
Crashes due to an error trying to load a folder:
In Ruby 1.9, string indexing was changed to return codepoints rather than bytes, so the
!= 0x2F
check never fires. I believe this patch should fix it on both vanilla Game.exe and MKXP:Apologies if it's a bit of a hack, I'm not too familiar with Ruby.
The text was updated successfully, but these errors were encountered: