aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--misc/shell.bat3
-rw-r--r--src/gb/gb.h11
3 files changed, 9 insertions, 8 deletions
diff --git a/.gitignore b/.gitignore
index 9286b374c..71daef3f6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -256,7 +256,8 @@ paket-files/
*.sln
builds/
bin/
+*.exe
# - Linux/MacOS
odin
-odin.dSYM \ No newline at end of file
+odin.dSYM
diff --git a/misc/shell.bat b/misc/shell.bat
index 6694eedb4..8785f82ed 100644
--- a/misc/shell.bat
+++ b/misc/shell.bat
@@ -1,7 +1,6 @@
@echo off
-rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL
-call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 1> NUL
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 1> NUL
rem call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86 1> NUL
set _NO_DEBUG_HEAP=1
diff --git a/src/gb/gb.h b/src/gb/gb.h
index cad436640..39291d043 100644
--- a/src/gb/gb.h
+++ b/src/gb/gb.h
@@ -4873,7 +4873,7 @@ GB_ALLOCATOR_PROC(gb_heap_allocator_proc) {
case gbAllocation_Resize: {
ptr = realloc(old_memory, size);
// ptr = gb_default_resize_align(gb_heap_allocator(), old_memory, old_size, size, alignment);
- } break;
+ } break;
#else
// TODO(bill): *nix version that's decent
case gbAllocation_Alloc: {
@@ -5086,7 +5086,7 @@ void gb_affinity_init(gbAffinity *a) {
}
#undef AF__CHECK
}
-
+
fclose(cpu_info);
}
@@ -7619,10 +7619,11 @@ gbFileError gb_file_close(gbFile *f) {
return gbFileError_Invalid;
}
- //
+#if defined(GB_COMPILER_MSVC)
+ if (f->filename) gb_free(gb_heap_allocator(), cast(char *)f->filename);
+#else
// TODO HACK(bill): Memory Leak!!!
- // if (f->filename) gb_free(gb_heap_allocator(), cast(char *)f->filename);
- //
+#endif
#if defined(GB_SYSTEM_WINDOWS)
if (f->fd.p == INVALID_HANDLE_VALUE) {