Update libretro-common files
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
/* http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 */
|
||||
|
||||
int vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
|
||||
int c99_vsnprintf_retro__(char *outBuf, size_t size, const char *format, va_list ap)
|
||||
{
|
||||
int count = -1;
|
||||
|
||||
@@ -46,7 +46,7 @@ int vsnprintf(char *outBuf, size_t size, const char *format, va_list ap)
|
||||
return count;
|
||||
}
|
||||
|
||||
int snprintf(char *outBuf, size_t size, const char *format, ...)
|
||||
int c99_snprintf_retro__(char *outBuf, size_t size, const char *format, ...)
|
||||
{
|
||||
int count;
|
||||
va_list ap;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2015 The RetroArch team
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (memory_stream.h).
|
||||
@@ -26,6 +26,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct memstream memstream_t;
|
||||
|
||||
memstream_t *memstream_open(unsigned writing);
|
||||
@@ -52,4 +56,6 @@ void memstream_set_buffer(uint8_t *buffer, size_t size);
|
||||
|
||||
size_t memstream_get_last_size(void);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010-2016 The RetroArch team
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (memory_stream.c).
|
||||
@@ -24,7 +24,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../include/streams/memory_stream.h"
|
||||
#include <streams/memory_stream.h>
|
||||
|
||||
static uint8_t* g_buffer = NULL;
|
||||
static size_t g_size = 0;
|
||||
@@ -41,7 +41,7 @@ struct memstream
|
||||
|
||||
static void memstream_update_pos(memstream_t *stream)
|
||||
{
|
||||
if (stream->ptr > stream->max_ptr)
|
||||
if (stream && stream->ptr > stream->max_ptr)
|
||||
stream->max_ptr = stream->ptr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user