- Changed a few functions not returning data when they should
This commit is contained in:
parent
c3443ea1e4
commit
4ac1b2accb
|
@ -85,4 +85,6 @@ void FsClose(void * search) {
|
||||||
int FsError(void) {
|
int FsError(void) {
|
||||||
if (GetLastError() == ERROR_NO_MORE_FILES)
|
if (GetLastError() == ERROR_NO_MORE_FILES)
|
||||||
return FS_ERR_NO_MORE_FILES;
|
return FS_ERR_NO_MORE_FILES;
|
||||||
|
|
||||||
|
return FS_ERR_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,7 @@ extern "C" {
|
||||||
|
|
||||||
#define FS_IS_DIR 1
|
#define FS_IS_DIR 1
|
||||||
|
|
||||||
|
#define FS_ERR_UNKNOWN -1
|
||||||
#define FS_ERR_NO_MORE_FILES 1
|
#define FS_ERR_NO_MORE_FILES 1
|
||||||
|
|
||||||
extern const char FS_SEPARATOR;
|
extern const char FS_SEPARATOR;
|
||||||
|
|
|
@ -81,10 +81,12 @@ u8 *mc_alloc(memory_chip_t *mc, u32 size)
|
||||||
u8 *buffer;
|
u8 *buffer;
|
||||||
buffer = malloc(size);
|
buffer = malloc(size);
|
||||||
|
|
||||||
mc->data = buffer;
|
mc->data = buffer;
|
||||||
if(!buffer) { return NULL; }
|
if(!buffer) { return NULL; }
|
||||||
mc->size = size;
|
mc->size = size;
|
||||||
mc->writeable_buffer = TRUE;
|
mc->writeable_buffer = TRUE;
|
||||||
|
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mc_free(memory_chip_t *mc)
|
void mc_free(memory_chip_t *mc)
|
||||||
|
|
Loading…
Reference in New Issue