SizeOf Broken for Arrays in Objects

BlitzMax Forums/BlitzMax Programming/SizeOf Broken for Arrays in Objects

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.

Type OSVersionInfoEx

	Field dwOSVersionInfoSize: Long
	Field dwMajorVersion:Long
	Field dwMinorVersion:Long
	Field dwBuildNumber:Long
	Field dwPlatformId:Long
	Field szCSDVersion:Byte[128]
	Field wServicePackMajor: Int
	Field wServicePackMinor: Int
	Field wSuiteMask: Int
	Field wProductType: Byte
	Field wReserved: Byte
	
End Type


Global VersionInfo:OSVersionInfoEx=New OSVersionInfoEx
Print SizeOf(VersionInfo)


It doesn't seem to be counting the 128 bytes in the array. And it's not because the array isn't automatically initiated because it still returns the same value if you add the extra VersionInfo.szCSDVersion=New Byte[128] before calling SizeOf. SizeOf works fine on arrays on their own, just not in objects.