From 68a1725e0f2dcce5922d17825a21cb3df71f4250 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 31 Aug 2011 09:19:59 +0000 Subject: [PATCH] Some refinements. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3749 --- src/dos/drive_cache.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dos/drive_cache.cpp b/src/dos/drive_cache.cpp index 2c59c2a5..16e1d7c3 100644 --- a/src/dos/drive_cache.cpp +++ b/src/dos/drive_cache.cpp @@ -457,11 +457,12 @@ Bits DOS_Drive_Cache::GetLongName(CFileInfo* curDir, char* shortName) { char buff[CROSS_LEN]; for (Bits i = 0; i < filelist_size; i++) { res = wine_hash_short_file_name(curDir->fileList[i]->orgname,buff); - if (!strncmp(shortName,buff,res)) - { // Found + buff[res] = 0; + if (!strcmp(shortName,buff)) { + // Found strcpy(shortName,curDir->fileList[i]->orgname); return i; - }; + } } #endif // not available