logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Bug with accessing inherited members of derived structs (Read 542 times)
Masterkent
Developer Team
Offline



Posts: 792
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Bug with accessing inherited members of derived structs
Oct 26th, 2014 at 8:12pm
Print Post  
In the following code accessing d.i causes immediate crash.

Code
Select All
class Test expands Actor;

struct B
{
	var int i;
};

struct D expands B
{
	var string s;
};

function PostBeginPlay()
{
	local D d;
	d.i = 0;
} 


Whether the issue takes place depends on types of members in the derived structure. F.e., when I declare s with type int, the crash doesn't happen. When I declare s with type byte[25], int[7], or array<int>, the crash does happen.
  
Back to top
 
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7356
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: Bug with accessing inherited members of derived structs
Reply #1 - Feb 16th, 2017 at 8:02am
Print Post  
should be working now (thanks dots).
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 473
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: Bug with accessing inherited members of derived structs
Reply #2 - Feb 16th, 2017 at 7:37pm
Print Post  
Just out of curiosity, do the derived structs match the assumed /Zp4 setting used otherwise, or can derived uc structs actually break it?
  

HX on Mod DB. Revision on Steam.
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo