Simply formats/xml/rxml.c

This commit is contained in:
twinaphex 2017-12-11 18:01:56 +01:00
parent 5960cd80d2
commit a1ce8b58c4
2 changed files with 2 additions and 4 deletions

View File

@ -429,10 +429,7 @@ rxml_document_t *rxml_load_document(const char *path)
if (!doc)
goto error;
filestream_seek(file, 0, SEEK_END);
len = filestream_tell(file);
filestream_rewind(file);
len = filestream_get_size(file);
memory_buffer = (char*)malloc(len + 1);
if (!memory_buffer)
goto error;

View File

@ -249,6 +249,7 @@ RFILE *filestream_open(const char *path, unsigned mode, unsigned hints)
if (stream->fd == -1)
goto error;
#ifdef HAVE_MMAP
if (stream->hints & RETRO_VFS_FILE_ACCESS_HINT_MEMORY_MAP)
{