Fix bug 122 - SDL_RWops bug fixes: set RWops.type field, add input validation, add test coverage

This commit is contained in:
Andreas Schiffler 2013-03-13 08:35:03 -07:00
parent ae480eecfd
commit 42a673ce23
3 changed files with 215 additions and 14 deletions

View file

@ -40,6 +40,14 @@ extern "C" {
/* *INDENT-ON* */
#endif
/* RWops Types */
#define SDL_RWOPS_UNKNOWN 0 /* Unknown stream type */
#define SDL_RWOPS_WINFILE 1 /* Win32 file */
#define SDL_RWOPS_STDFILE 2 /* Stdio file */
#define SDL_RWOPS_JNIFILE 3 /* Android asset */
#define SDL_RWOPS_MEMORY 4 /* Memory stream */
#define SDL_RWOPS_MEMORY_RO 5 /* Read-Only memory stream */
/**
* This is the read/write operation structure -- very basic.
*/