Added MSVC build support, likely broke tests

This commit is contained in:
2023-02-11 00:49:21 +00:00
parent be4cbf1ad6
commit 457014d577
18 changed files with 432 additions and 148 deletions

View File

@@ -57,7 +57,7 @@ int Toy_writeFile(const char* path, const unsigned char* bytes, size_t size) {
return -1;
}
int written = fwrite(bytes, size, 1, file);
size_t written = fwrite(bytes, size, 1, file);
if (written != 1) {
fprintf(stderr, TOY_CC_ERROR "Could not write file \"%s\"\n" TOY_CC_RESET, path);
@@ -118,7 +118,7 @@ void Toy_runBinary(const unsigned char* tb, size_t size) {
Toy_injectNativeHook(&interpreter, "timer", Toy_hookTimer);
Toy_injectNativeHook(&interpreter, "runner", Toy_hookRunner);
Toy_runInterpreter(&interpreter, tb, size);
Toy_runInterpreter(&interpreter, tb, (int)size);
Toy_freeInterpreter(&interpreter);
}