1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

(svn r11597) -Change: replace all remaining instances of (re|m|c)alloc with (Re|M|C)allocT and add a check for out-of-memory situations to the *allocT functions.

This commit is contained in:
rubidium
2007-12-08 14:50:41 +00:00
parent 73c58d8a40
commit f1e4914b5f
13 changed files with 19 additions and 16 deletions

View File

@@ -310,7 +310,7 @@ void init_Hash(Hash* h, Hash_HashProc* hash, uint num_buckets)
h->hash = hash;
h->size = 0;
h->num_buckets = num_buckets;
h->buckets = (HashNode*)malloc(num_buckets * (sizeof(*h->buckets) + sizeof(*h->buckets_in_use)));
h->buckets = (HashNode*)MallocT<byte>(num_buckets * (sizeof(*h->buckets) + sizeof(*h->buckets_in_use)));
#ifdef HASH_DEBUG
debug("Buckets = %p", h->buckets);
#endif