array subscript out of range

Report bugs, bug fixes and workarounds here.
Topic author
Seli
Posts: 1
Joined: 10.06.2009
With us: 15 years 5 months

array subscript out of range

Post #1by Seli » 10.06.2009, 17:22

From https://bugzilla.novell.com/show_bug.cgi?id=216330 :
"
I just tried to compile package celestia-1.3.2-38 with the Intel
C compiler.

It said

bigfix.cpp(174): warning #175: subscript out of range

The source code is

if (n[N_WORDS] != 0)

Strange. Not only does n[N_WORDS] not exist, but also it
has no dependency on the loop variable i.

Perhaps the programmer intended

if (n[ i] != 0)
"

"
package celestia-1.5.1-48.3 and the compiler said

bigfix.cpp:168:22: warning: array subscript is above array bounds
"

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: array subscript out of range

Post #2by chris » 10.06.2009, 17:26

This is fixed in Celestia 1.6.0 (current SVN code base)... The BigFix was rewritten to represent the 128-fixed point values as a pair of 64-bit integers instead of an array of 8 16-bit values.

--Chris


Return to “Bugs”