Commit 5515170d authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Be less strict while parsing file open mode in fopen function.

parent fc8dfe60
...@@ -1263,6 +1263,8 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st ...@@ -1263,6 +1263,8 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st
TRACE("%s\n", debugstr_w(mode)); TRACE("%s\n", debugstr_w(mode));
while(*mode == ' ') mode++;
switch(*mode++) switch(*mode++)
{ {
case 'R': case 'r': case 'R': case 'r':
...@@ -1301,6 +1303,8 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st ...@@ -1301,6 +1303,8 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st
break; break;
case '+': case '+':
case ' ': case ' ':
case 'a':
case 'w':
break; break;
default: default:
MSVCRT_INVALID_PMT(0, MSVCRT_EINVAL); MSVCRT_INVALID_PMT(0, MSVCRT_EINVAL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment