Advertisement

Bug returning a vector of a registered struct

Started by September 30, 2009 06:56 AM
3 comments, last by xivVerge 15 years, 1 month ago
Hi, I updated from 2.15.0 to version 2.17.0 and now I have a problem returning a vector of registered structs. I use the stdvector.h from the test directory and modified the test_stdvector file to reproduce the bug. The following script example will not print 10 as expected but some random memory content.

void Test()
{
  Print(TestInt()[0].v);
}

MyStruct[] TestInt()
{
  MyStruct[] a;
  MyStruct m; m.v=10;
  a.push_back(m);
  return a;
}

Tim
WitchLord is away for a week or so I think, I'm sure he'll be able to help you when he gets back :)
==============================
A Developers Blog | Dark Rock Studios - My Site
Advertisement
I'm back now. I'll look into this problem as soon as possible. Thanks for making it easier for me to reproduce it.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

I've fixed this bug now. You can get the fix from the SVN (rev 488).

Thanks for making it easy for me to reproduce the problem.

Regards,
Andreas

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Cool, thx for the quick fix.

Tim

This topic is closed to new replies.

Advertisement