From e0f3ce9cf02b6c0392ce65cf22f655b5dde8b649 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Tue, 22 Jun 2021 11:57:30 +0200 Subject: [PATCH] fix loading of short mesh file names --- libsrc/interface/nginterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsrc/interface/nginterface.cpp b/libsrc/interface/nginterface.cpp index d38b7234..525ed035 100644 --- a/libsrc/interface/nginterface.cpp +++ b/libsrc/interface/nginterface.cpp @@ -150,7 +150,7 @@ void Ng_LoadMesh (const char * filename, ngcore::NgMPI_Comm comm) mesh->SetCommunicator(comm); string fn(filename); - if (fn.substr (fn.length()-8, 8) == ".vol.bin") + if (fn.length() > 8 && fn.substr (fn.length()-8, 8) == ".vol.bin") { mesh -> Load(fn); SetGlobalMesh (mesh);