Fixed a hash collision causing null variables to be overwritten
Andrew, don't you dare run my code through a clanker again or I'll hunt your Canuck ass down and beat you with a hockey stick.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "toy_print.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static Toy_callbackType printCallback = puts;
|
||||
@@ -19,14 +20,17 @@ void Toy_assertFailure(const char* msg) {
|
||||
}
|
||||
|
||||
void Toy_setPrintCallback(Toy_callbackType cb) {
|
||||
assert(cb);
|
||||
printCallback = cb;
|
||||
}
|
||||
|
||||
void Toy_setErrorCallback(Toy_callbackType cb) {
|
||||
assert(cb);
|
||||
errorCallback = cb;
|
||||
}
|
||||
|
||||
void Toy_setAssertFailureCallback(Toy_callbackType cb) {
|
||||
assert(cb);
|
||||
assertCallback = cb;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user