ptitSeb / friking-shark

Port of Friking Shark (remake of Flying Shark) on the OpenPandora, Odroid and most Linux. Also with AmigaOS4 support. Status: Working (using gl4es).
https://boards.openpandora.org/topic/5600375-friking-shark/
Other
11 stars 0 forks source link

Differing matrix sizes cause compile to fail on Linux/x64 with gcc-4.5.2 #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
To reproduce :

1. Run make.

Problem :

Compile fails at VectorLib.cpp line 1484 with a message about array subscripts 
(it looks like one matrix is 3x3 and the other is 4x4)

I'm compiling SVN revision 409 on Ubuntu Natty.

Changing the size of e in CMatrix33 appears to fix the problem.

Original issue reported on code.google.com by dgo...@gmail.com on 10 Jun 2011 at 10:39

GoogleCodeExporter commented 8 years ago
Thanks for the feedback, 

Seems to be an overrun if "r" or "c" are not in 0-3 range. I'm calculating the 
matrix minor, only 3 of the 4 rows and columns are taken so there is no problem 
if "r" and "c" params are both >=0 and <=3. Just checking the params will fix 
it, hope gcc realizes and stop complaining.

Will have to test it tomorrow, to late here :(

Original comment by javierma...@gmail.com on 12 Jun 2011 at 3:04

GoogleCodeExporter commented 8 years ago

Original comment by javierma...@gmail.com on 12 Jun 2011 at 9:59

GoogleCodeExporter commented 8 years ago
The parameter checking has been enough. Reproduced and tested using gcc-4.5.

Original comment by javierma...@gmail.com on 12 Jun 2011 at 12:33