diff --git a/tools/assimp_view/Display.cpp b/tools/assimp_view/Display.cpp index a1d113aea..41b73d7c8 100644 --- a/tools/assimp_view/Display.cpp +++ b/tools/assimp_view/Display.cpp @@ -1320,8 +1320,10 @@ int CDisplay::HandleTreeViewPopup2(WPARAM wParam,LPARAM lParam) { // need to remove the file name char* sz = strrchr(szFileName,'\\'); - if (!sz)sz = strrchr(szFileName,'/'); - if (!sz)*sz = 0; + if (!sz) + sz = strrchr(szFileName,'/'); + if (sz) + *sz = 0; } OPENFILENAME sFilename1 = { sizeof(OPENFILENAME), @@ -1353,8 +1355,10 @@ int CDisplay::HandleTreeViewPopup2(WPARAM wParam,LPARAM lParam) { // need to remove the file name char* sz = strrchr(szFileName,'\\'); - if (!sz)sz = strrchr(szFileName,'/'); - if (!sz)*sz = 0; + if (!sz) + sz = strrchr(szFileName,'/'); + if (sz) + *sz = 0; } OPENFILENAME sFilename1 = { sizeof(OPENFILENAME), diff --git a/tools/assimp_view/LogWindow.cpp b/tools/assimp_view/LogWindow.cpp index c8e725c34..c21c2802e 100644 --- a/tools/assimp_view/LogWindow.cpp +++ b/tools/assimp_view/LogWindow.cpp @@ -168,8 +168,10 @@ void CLogWindow::Save() { // need to remove the file name char* sz = strrchr(szFileName,'\\'); - if (!sz)sz = strrchr(szFileName,'/'); - if (!sz)*sz = 0; + if (!sz) + sz = strrchr(szFileName,'/'); + if (sz) + *sz = 0; } OPENFILENAME sFilename1 = { sizeof(OPENFILENAME), diff --git a/tools/assimp_view/MessageProc.cpp b/tools/assimp_view/MessageProc.cpp index 4fed990eb..74c94d7d6 100644 --- a/tools/assimp_view/MessageProc.cpp +++ b/tools/assimp_view/MessageProc.cpp @@ -474,8 +474,10 @@ void LoadBGTexture() { // need to remove the file name char* sz = strrchr(szFileName,'\\'); - if (!sz)sz = strrchr(szFileName,'/'); - if (!sz)*sz = 0; + if (!sz) + sz = strrchr(szFileName,'/'); + if (sz) + *sz = 0; } OPENFILENAME sFilename1 = { sizeof(OPENFILENAME), @@ -597,8 +599,10 @@ void LoadSkybox() { // need to remove the file name char* sz = strrchr(szFileName,'\\'); - if (!sz)sz = strrchr(szFileName,'/'); - if (!sz)*sz = 0; + if (!sz) + sz = strrchr(szFileName,'/'); + if (sz) + *sz = 0; } OPENFILENAME sFilename1 = { sizeof(OPENFILENAME), @@ -639,8 +643,10 @@ void SaveScreenshot() { // need to remove the file name char* sz = strrchr(szFileName,'\\'); - if (!sz)sz = strrchr(szFileName,'/'); - if (!sz)*sz = 0; + if (!sz) + sz = strrchr(szFileName,'/'); + if (sz) + *sz = 0; } OPENFILENAME sFilename1 = { sizeof(OPENFILENAME), @@ -938,8 +944,10 @@ void OpenAsset() { // need to remove the file name char* sz = strrchr(szFileName,'\\'); - if (!sz)sz = strrchr(szFileName,'/'); - if (!sz)*sz = 0; + if (!sz) + sz = strrchr(szFileName,'/'); + if (sz) + *sz = 0; } // get a list of all file extensions supported by ASSIMP