fixed small bug (shortname > 8 char)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@670
This commit is contained in:
parent
412d91902a
commit
f89fca8d24
1 changed files with 1 additions and 1 deletions
|
@ -322,7 +322,7 @@ void DOS_Drive_Cache::CreateShortName(CFileInfo* curDir, CFileInfo* info)
|
|||
sprintf(buffer,"%d",info->shortNr);
|
||||
// Copy first letters
|
||||
Bit16u tocopy;
|
||||
if (len+strlen(buffer)>8) tocopy = 8 - strlen(buffer) - 1;
|
||||
if (len+strlen(buffer)+1>8) tocopy = 8 - strlen(buffer) - 1;
|
||||
else tocopy = len;
|
||||
strncpy(info->shortname,tmpName,tocopy);
|
||||
info->shortname[tocopy] = 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue