LARGE For loop bug found!

BlitzMax Forums/BlitzMax Programming/LARGE For loop bug found!

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

[EDIT] FORGET IT! I forgot to call NEW TCollideObject on each one, sorry to waste your time (I'll get my coat). I was running with debug mode turned off and it didn't complain about the null objects.

Check it out:

Strict

Type TCollideObject
	Field Value%
End Type

Global CollideObjects:TCollideObject[10]

Global Ints[10]

For Local i=0 To 9
	CollideObjects[i].Value=i
	Ints[i]=i
	Print "i="+i
Next

For Local i=0 To 9
	Print "objects="+CollideObjects[i].Value
	Print "ints   ="+ints[i]
Next


The results should be self explanatory, but basically when i is assigned to the object Value field it is always 9! The max value from the loop. Yet when assigned to the int array (and when printed) it's correct.

This has gotta be a bug right? If you agree I'll post it in the bug forum.

Done in BMax 1.24 fully synced.