Skip to content
Snippets Groups Projects
Commit 4dca4901 authored by rswindell's avatar rswindell
Browse files

Fixed bug created in rev 1.12 where files with no extension would corrupt the

listing.
parent 8c2f1a69
No related branches found
No related tags found
No related merge requests found
......@@ -151,8 +151,8 @@ int sbbs_t::listfiles(uint dirnum, char *filespec, int tofile, long mode)
FREE((char *)datbuf);
return(-1); }
for(j=0;j<12 && m<l;j++)
if(j==8 && ixbbuf[8]>' ')
str[j]='.';
if(j==8)
str[j]=ixbbuf[m]>' ' ? '.' : ' ';
else
str[j]=ixbbuf[m++]; /* Turns FILENAMEEXT into FILENAME.EXT */
str[j]=0;
......@@ -914,8 +914,8 @@ int sbbs_t::listfileinfo(uint dirnum, char *filespec, long mode)
found=-1;
break; }
for(i=0;i<12 && m<l;i++)
if(i==8 && ixbbuf[8]>' ')
str[i]='.';
if(i==8)
str[i]=ixbbuf[m]>' ' ? '.' : ' ';
else
str[i]=ixbbuf[m++]; /* Turns FILENAMEEXT into FILENAME.EXT */
str[i]=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment