Ver a proveniência

Fix heap corruption in malloc

Use SDL's malloc functions in abstractions.
master
ascendente
cometimento
8c9e34b691
2 ficheiros alterados com 4 adições e 4 eliminações
  1. +3
    -3
      src/packages/stdinc/IZ_stdlib.c
  2. +1
    -1
      src/packages/stdinc/IZ_stdlib.h

+ 3
- 3
src/packages/stdinc/IZ_stdlib.c Ver ficheiro

@@ -1,13 +1,13 @@
#include "IZ_stdlib.h"

void* IZ_malloc(size_t size) {
return malloc(size);
return SDL_malloc(size);
}

void* IZ_calloc(unsigned int count, size_t size) {
return calloc(count, size);
return SDL_calloc(count, size);
}

void IZ_free(void* p) {
free(p);
SDL_free(p);
}

+ 1
- 1
src/packages/stdinc/IZ_stdlib.h Ver ficheiro

@@ -1,7 +1,7 @@
#ifndef IZ_STDLIB_H
#define IZ_STDLIB_H

#include <stdlib.h>
#include <SDL_stdinc.h>

void* IZ_malloc(size_t);
void* IZ_calloc(unsigned int, size_t);


Carregando…
Cancelar
Guardar