Game Development Community

[BUG 1.1beta] guiStackControl issue - RESOLVED

by elvince · in Torque 3D Professional · 02/14/2010 (1:05 pm) · 4 replies

Hi,

Just a quick bug:

1/ Open your gui editor
2/ put a guistackcontrol on it
3/ change horizontal from "Top to Bottom" to "Bottom to Top"

And you have the issue : Fatal - Vector<T>::operator[] - out of bounds array access!

Regards,

#1
02/15/2010 (4:13 pm)

Confirmed and fixed.

In GuiStackControl::stackFromBottom()

GuiControl * gc = dynamic_cast<GuiControl*>(operator [](size()-1));
   if(gc)
      curPos.y -= gc->getExtent().y;

should be

if( size() )
   {
      GuiControl * gc = dynamic_cast<GuiControl*>(operator [](size()-1));
      if(gc)
         curPos.y -= gc->getExtent().y;
   }

or, better, the function should start with

if( empty() )
      return;
#2
07/14/2010 (2:58 am)
Logged: TQA-566
#3
09/01/2010 (11:36 pm)
This was fixed in 1.1 Beta 2.
#4
09/24/2010 (10:16 pm)
confirmed as fixed in Beta 3