--- mstools/samples/showdib/drawdib.c 2018/08/09 18:20:44 1.1.1.2 +++ mstools/samples/showdib/drawdib.c 2018/08/09 18:21:42 1.1.1.3 @@ -555,9 +555,11 @@ VOID SizeWindow (HWND hWnd) /* Extract the filename from the full pathname */ pstr = achFileName + lstrlen(achFileName) - 1; - while ((*pstr != '\\') && (*pstr != ':') && (pstr >= achFileName)) + while ((*pstr != '\\') && (*pstr != ':') && (pstr > achFileName)) pstr--; - pstr++; + + if(pstr != achFileName) + pstr++; /* Format filename along with the DIB attributes */ sprintf (Name,