From 4e5dfe1aae8644967dcf6a1b2e0a5f59c4fef2da Mon Sep 17 00:00:00 2001 From: martin-marinov77 <53574656+martin-marinov77@users.noreply.github.com> Date: Wed, 14 Aug 2019 19:20:02 +0100 Subject: [PATCH] Fix a potential crash when initializing the map for meshes with holes (#1263) * * Fix a potential crash when initializing the map for meshes with holes * Fix a minor conversion warning * * Fix a potential crash when initializing the map for meshes with holes * Fix a minor conversion warning --- tutorial/710_SCAF/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorial/710_SCAF/main.cpp b/tutorial/710_SCAF/main.cpp index 107df79ce..28c523757 100755 --- a/tutorial/710_SCAF/main.cpp +++ b/tutorial/710_SCAF/main.cpp @@ -21,7 +21,7 @@ igl::Timer timer; igl::SCAFData scaf_data; bool show_uv = false; -float uv_scale = 0.2; +float uv_scale = 0.2f; bool key_down(igl::opengl::glfw::Viewer& viewer, unsigned char key, int modifier) { @@ -99,7 +99,7 @@ int main(int argc, char *argv[]) Eigen::MatrixXi F_filled; igl::topological_hole_fill(F, bnd, all_bnds, F_filled); igl::harmonic(F_filled, bnd, bnd_uv ,1, uv_init); - uv_init = uv_init.topRows(V.rows()); + uv_init.conservativeResize(V.rows(), 2); } Eigen::VectorXi b; Eigen::MatrixXd bc;