X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Flib%2Fnewinflib%2Finfcore.c;h=b70ce795e1991be8348007ffd232bc139f7d055f;hp=3582ec5678772f1a024e588acec0767916f84385;hb=1a9d9f441c0b721f0a6e195e70ffd2e384a592f0;hpb=9adb79a0d9b3604895b167c6c8e9af526539cb9e;ds=sidebyside diff --git a/reactos/lib/newinflib/infcore.c b/reactos/lib/newinflib/infcore.c index 3582ec56787..b70ce795e19 100644 --- a/reactos/lib/newinflib/infcore.c +++ b/reactos/lib/newinflib/infcore.c @@ -365,7 +365,7 @@ __inline static enum parser_state set_state( struct parser *parser, enum parser_ /* check if the pointer points to an end of file */ __inline static int is_eof( struct parser *parser, const WCHAR *ptr ) { - return (ptr >= parser->end || *ptr == CONTROL_Z); + return (ptr >= parser->end || *ptr == CONTROL_Z || *ptr == 0); } @@ -375,7 +375,8 @@ __inline static int is_eol( struct parser *parser, const WCHAR *ptr ) return (ptr >= parser->end || *ptr == CONTROL_Z || *ptr == '\n' || - (*ptr == '\r' && *(ptr + 1) == '\n')); + (*ptr == '\r' && *(ptr + 1) == '\n') || + *ptr == 0); }