Don't write past the terminator in the DTA name field when setting search results. This is what DOS does, and writing junk after the terminator was not good in any case. Fixes file listing in the 16-bit version of Galaxy Player.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3945
This commit is contained in:
parent
1eecef3f33
commit
6c0cca1878
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ void DOS_DTA::SetupSearch(Bit8u _sdrive,Bit8u _sattr,char * pattern) {
|
|||
}
|
||||
|
||||
void DOS_DTA::SetResult(const char * _name,Bit32u _size,Bit16u _date,Bit16u _time,Bit8u _attr) {
|
||||
MEM_BlockWrite(pt+offsetof(sDTA,name),(void *)_name,DOS_NAMELENGTH_ASCII);
|
||||
MEM_BlockWrite(pt+offsetof(sDTA,name),(void *)_name,strlen(_name)+1);
|
||||
sSave(sDTA,size,_size);
|
||||
sSave(sDTA,date,_date);
|
||||
sSave(sDTA,time,_time);
|
||||
|
|
Loading…
Add table
Reference in a new issue