浏览代码

Merge remote-tracking branch 'refs/remotes/GarageGames/development' into development

chaigler 10 年之前
父节点
当前提交
ab428617b9
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 1 1
      engine/source/2d/sceneobject/SceneObject_ScriptBinding.h
  2. 5 0
      engine/source/platform/types.h

+ 1 - 1
engine/source/2d/sceneobject/SceneObject_ScriptBinding.h

@@ -2065,7 +2065,7 @@ ConsoleMethodWithDocs(SceneObject, growTo, ConsoleBool, 4, 4, (targetSize width
 	}
 
 	Vector2 rate;
-	const U32 rateCount = Utility::mGetStringElementCount(argv[2]);
+	const U32 rateCount = Utility::mGetStringElementCount(argv[3]);
 	if (rateCount == 1)
 	{
 		rate.x = dAtof(Utility::mGetStringElement(argv[3], 0));

+ 5 - 0
engine/source/platform/types.h

@@ -170,6 +170,11 @@ inline U32 endianSwap(const U32 in_swap)
 #define Offset(x, cls) _Offset_Normal(x, cls)
 #define OffsetNonConst(x, cls) _Offset_Variant_1(x, cls)
 
+#elif defined(TORQUE_COMPILER_GCC) && (__GNUC__ == 5)
+#include <stddef.h>
+#define Offset(x, cls) offsetof(cls, x)
+#define OffsetNonConst(x, cls) _Offset_Normal(x, cls)
+
 #endif
 #endif