Replace TrustedAsOfLength with safe As and Set.

This commit is contained in:
2023-02-10 15:47:20 +08:00
parent c04e50e959
commit b437925f92
7 changed files with 65 additions and 33 deletions

View File

@@ -16,10 +16,10 @@ namespace Cryville.Crtr.Components {
public op_set_bound(SpriteBase self) : base(2) {
_self = self;
}
protected unsafe override void Execute() {
protected override void Execute() {
_self.SetBound(
*(Vector2*)GetOperand(0).TrustedAsOfLength(sizeof(Vector2)),
*(Vector3*)GetOperand(1).TrustedAsOfLength(sizeof(Vector3))
GetOperand(0).As<Vector2>(),
GetOperand(1).As<Vector3>()
);
}
}