diff --git a/build.bat b/build.bat index b7cec37..e9aeadc 100644 --- a/build.bat +++ b/build.bat @@ -3,7 +3,7 @@ call ../misc/compile_setup.bat mkdir build cd build -cl -Fe:bld.exe ../code/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS /fsanitize=address +cl -Fe:bld.exe ../code/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS cd .. build\bld.exe diff --git a/build.sh b/build.sh index a9f57a4..2949aac 100644 --- a/build.sh +++ b/build.sh @@ -1,3 +1,3 @@ #!/usr/bin/env bash gcc -o bld code/build_main.cpp -g -./bld cc=clang +./bld diff --git a/code/io.c b/code/io.c index eddbb64..043601b 100644 --- a/code/io.c +++ b/code/io.c @@ -84,6 +84,9 @@ IO_API bool IO__FatalErrorf(const char *file, int line, const char *msg, ...) { } IO_API void IO_Printf(const char *msg, ...) { + // First try to use a static buffer. That can fail because the message + // can be bigger then the buffer. Allocate enough memory to fit in that + // case. va_list args1; va_list args2; char buff[2048];