mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Tweaked error message
This commit is contained in:
@@ -50,7 +50,7 @@ void* Toy_partBucket(Toy_Bucket** bucketHandle, size_t space) {
|
||||
|
||||
//if you try to allocate too much space
|
||||
if ((*bucketHandle)->capacity < space) {
|
||||
fprintf(stderr, TOY_CC_ERROR "[internal] ERROR: Failed to partition bucket memory, not enough capacity\n" TOY_CC_RESET);
|
||||
fprintf(stderr, TOY_CC_ERROR "[internal] ERROR: Failed to partition bucket memory, not enough capacity: needed %d, only %d available\n" TOY_CC_RESET, (int)space, (int)((*bucketHandle)->capacity));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@ TOY_API void* Toy_reallocate(void* pointer, size_t oldSize, size_t newSize);
|
||||
typedef struct Toy_Bucket {
|
||||
struct Toy_Bucket* next;
|
||||
void* contents;
|
||||
int capacity;
|
||||
int count;
|
||||
size_t capacity;
|
||||
size_t count;
|
||||
} Toy_Bucket;
|
||||
|
||||
TOY_API void Toy_initBucket(Toy_Bucket** bucketHandle, size_t capacity);
|
||||
|
||||
Reference in New Issue
Block a user