1
0
Fork 0

fix tiny bug when >> is used on a non-existing file

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2214
This commit is contained in:
Peter Veenstra 2005-05-31 20:19:13 +00:00
parent df1b64ffad
commit 3c88eaf92d

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell.cpp,v 1.60 2005-04-29 14:10:45 qbix79 Exp $ */
/* $Id: shell.cpp,v 1.61 2005-05-31 20:19:13 qbix79 Exp $ */
#include <stdlib.h>
#include <stdarg.h>
@ -195,8 +195,11 @@ void DOS_Shell::ParseLine(char * line) {
bool status = true;
/* Create if not exist. Open if exist. Both in read/write mode */
if(append) {
if( (status = DOS_OpenFile(out,2,&dummy)) )
if( (status = DOS_OpenFile(out,2,&dummy)) ) {
DOS_SeekFile(1,&bigdummy,DOS_SEEK_END);
} else {
status = DOS_CreateFile(out,2,&dummy); //Create if not exists.
}
}
else
status = DOS_OpenFileExtended(out,2,2,0x12,&dummy,&dummy2);