-fixed writing to NTFS and maybe more

This commit is contained in:
fix94.1 2012-09-21 19:46:58 +00:00
parent 3e8c4b2b6d
commit 6cee8ba139

View File

@ -71,9 +71,7 @@ void *MEM1_memalign(unsigned int a, unsigned int s)
void *MEM1_realloc(void *p, unsigned int s)
{
if(!p)
return NULL;
if((u32)p > (u32)MEM1_lo_start && (u32)p < (u32)MEM1_lo_end)
if(!p || ((u32)p > (u32)MEM1_lo_start && (u32)p < (u32)MEM1_lo_end))
return g_mem1lo.reallocate(p, s);
return __real_realloc(p, s);
}
@ -123,15 +121,11 @@ void *MEM2_memalign(unsigned int /* alignment */, unsigned int s)
void *MEM2_realloc(void *p, unsigned int s)
{
if(!p)
return NULL;
return g_mem2gp.reallocate(p, s);
}
unsigned int MEM2_usableSize(void *p)
{
if(!p)
return 0;
return g_mem2gp.usableSize(p);
}