From 2e4a5cd441737fade547e3264ce07b862d3ef5b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 15 Oct 2016 23:02:23 +0200 Subject: [PATCH] Fix mingw builds --- src/interface/graph.c | 4 ++++ src/platform/windows.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/interface/graph.c b/src/interface/graph.c index 6543a12d54..a0a44d3f41 100644 --- a/src/interface/graph.c +++ b/src/interface/graph.c @@ -46,6 +46,7 @@ static void graph_draw_line_a_uint8(rct_drawpixelinfo *dpi, uint8 *history, int { int i, x, y, lastX, lastY; lastX = -1; + lastY = -1; x = baseX; for (i = count - 1; i >= 0; i--) { if (history[i] != 0 && history[i] != 255) { @@ -70,6 +71,7 @@ static void graph_draw_line_b_uint8(rct_drawpixelinfo *dpi, uint8 *history, int int i, x, y, lastX, lastY; lastX = -1; + lastY = -1; x = baseX; for (i = count - 1; i >= 0; i--) { if (history[i] != 0 && history[i] != 255) { @@ -122,6 +124,7 @@ static void graph_draw_line_a_money32(rct_drawpixelinfo *dpi, money32 *history, { int i, x, y, lastX, lastY; lastX = -1; + lastY = -1; x = baseX; for (i = count - 1; i >= 0; i--) { if (history[i] != 0x80000000) { @@ -146,6 +149,7 @@ static void graph_draw_line_b_money32(rct_drawpixelinfo *dpi, money32 *history, int i, x, y, lastX, lastY; lastX = -1; + lastY = -1; x = baseX; for (i = count - 1; i >= 0; i--) { if (history[i] != 0x80000000) { diff --git a/src/platform/windows.c b/src/platform/windows.c index f4d4828412..6f7cccc752 100644 --- a/src/platform/windows.c +++ b/src/platform/windows.c @@ -56,7 +56,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine int argc; char ** argv = (char**)windows_get_command_line_args(&argc); - int runGame = cmdline_run(argv, argc); + int runGame = cmdline_run((const char **)argv, argc); // Free argv for (int i = 0; i < argc; i++) {