From d8ccc1c2b558a81afb7b7a8c06593d93c2d4b9a5 Mon Sep 17 00:00:00 2001 From: xebra Date: Tue, 30 Jan 2018 18:10:11 +0900 Subject: [PATCH] [spline/bezier]minor fix --- GPU/Common/SplineCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Common/SplineCommon.cpp b/GPU/Common/SplineCommon.cpp index a82176dc17..232b834746 100644 --- a/GPU/Common/SplineCommon.cpp +++ b/GPU/Common/SplineCommon.cpp @@ -881,7 +881,7 @@ void DrawEngineCommon::SubmitSpline(const void *control_points, const void *indi *bytesRead = count_u * count_v * origVDecoder->VertexSize(); // Simplify away bones and morph before proceeding - SimpleVertex *simplified_control_points = (SimpleVertex *)managedBuf.Allocate(sizeof(SimpleVertex) * index_upper_bound + 1); + SimpleVertex *simplified_control_points = (SimpleVertex *)managedBuf.Allocate(sizeof(SimpleVertex) * (index_upper_bound + 1)); u8 *temp_buffer = managedBuf.Allocate(sizeof(SimpleVertex) * count_u * count_v); u32 origVertType = vertType; @@ -969,7 +969,7 @@ void DrawEngineCommon::SubmitBezier(const void *control_points, const void *indi // Simplify away bones and morph before proceeding // There are normally not a lot of control points so just splitting decoded should be reasonably safe, although not great. - SimpleVertex *simplified_control_points = (SimpleVertex *)managedBuf.Allocate(sizeof(SimpleVertex) * index_upper_bound + 1); + SimpleVertex *simplified_control_points = (SimpleVertex *)managedBuf.Allocate(sizeof(SimpleVertex) * (index_upper_bound + 1)); u8 *temp_buffer = managedBuf.Allocate(sizeof(SimpleVertex) * count_u * count_v); u32 origVertType = vertType;