Fix windows writing bug (see 1124 on trunk).
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1138 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
9f5dfbee7e
commit
e373dbbe07
@ -35,7 +35,15 @@ namespace lisp
|
||||
: m_indent_depth(0)
|
||||
{
|
||||
m_owner = true;
|
||||
#ifdef WIN32
|
||||
// With mingw, the files are written dos style (crlf), but
|
||||
// these files can't be read with the lexer here. So we have
|
||||
// to force the file to be written as binary for windows.
|
||||
printf("Setting binary");
|
||||
m_out = new std::ofstream(filename.c_str(),::std::ios_base::binary);
|
||||
#else
|
||||
m_out = new std::ofstream(filename.c_str());
|
||||
#endif
|
||||
if(!m_out->good())
|
||||
{
|
||||
char msg[MAX_ERROR_MESSAGE_LENGTH];
|
||||
|
Loading…
Reference in New Issue
Block a user