foxygit / doom Log in
commit 8b8c8bf3d131445ae13cdfacdb7bb393561da0c4
Author:     Alex Mayfield <alexmax2742@gmail.com>
AuthorDate: Sun May 27 00:09:20 2018 -0400
Commit:     Alex Mayfield <alexmax2742@gmail.com>
CommitDate: Sun May 27 00:09:20 2018 -0400

    Fix PNG screenshot crash with MSVC

    malloc wasn't getting declared on MSVC, leading to calling an
    implicitly decleared function.  I think those return int, which caused
    the return value to be truncated on x64 builds, leading to an access
    violation on write.
---
 src/v_video.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/v_video.c b/src/v_video.c
index cabfba71..22e5602a 100644
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -20,6 +20,7 @@
 //

 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <math.h>