Chaos Project

Featured Projects => Advanced RPG Creator => ARC Reactor Engine => Topic started by: Blizzard on August 18, 2011, 12:26:37 pm

Title: Enterbrain Bitmap fail
Post by: Blizzard on August 18, 2011, 12:26:37 pm
I just found a bug by Enterbrain that nobody has ever found before. If you try to create a Bitmap instance with width > 0 and height != 0, it will use the absolute value of the height instead of crashing for values <= 0 (it still crashes with height = 0, though)! :O
Title: Re: Enterbrain Bitmap fail
Post by: Zeriab on August 18, 2011, 02:26:42 pm
Awesome, nice find!
Title: Re: Enterbrain Bitmap fail
Post by: Blizzard on August 18, 2011, 03:55:14 pm
I wouldn't have found it usually. I was trying to get CP running on ARC, but it would always crash when it's supposed to start a battle. I had to figure out what was going so after some time I found out that the height value was negative when the Bitmap was created. I ran it in RMXP and it worked fine. Then I found out that the negative value actually works which I then confirmed by trying this:

b = Bitmap.new(16, -32) # does not crash
p b.height # prints 32
Title: Re: Enterbrain Bitmap fail
Post by: G_G on August 18, 2011, 04:17:01 pm
Oh! That is interesting! Wait to go Enterbrain.
Title: Re: Enterbrain Bitmap fail
Post by: AngryPacman on August 19, 2011, 03:51:17 am
Hang on, Enterbrain did something unneeded and cool?
Title: Re: Enterbrain Bitmap fail
Post by: Subsonic_Noise on August 19, 2011, 04:09:36 am
I have no clue what this is about.
Title: Re: Enterbrain Bitmap fail
Post by: ForeverZer0 on August 19, 2011, 09:02:44 am
Its really not cool. It hides possible errors in your scripts.
Title: Re: Enterbrain Bitmap fail
Post by: Blizzard on August 19, 2011, 09:53:00 am
Like that one script in CP where I found the error originally. >:|
Title: Re: Enterbrain Bitmap fail
Post by: AngryPacman on August 19, 2011, 10:56:51 am
Well, if it wasn't picked up earlier then obviously it wasn't a noticeable or big error.