mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-24 13:32:39 +00:00
NewPtr(0) should return a non-null pointer.
This commit is contained in:
parent
e8d756c1b6
commit
92d465fb56
@ -241,10 +241,10 @@ namespace MM
|
||||
// native pointers.
|
||||
|
||||
mcptr = 0;
|
||||
if (size == 0) return 0;
|
||||
//if (size == 0) return 0;
|
||||
|
||||
uint8_t *ptr = nullptr;
|
||||
ptr = (uint8_t *)mplite_malloc(&pool, size);
|
||||
ptr = (uint8_t *)mplite_malloc(&pool, size ? size : 1);
|
||||
if (!ptr)
|
||||
{
|
||||
return SetMemError(MacOS::memFullErr);
|
||||
|
Loading…
Reference in New Issue
Block a user