From 5af72543bfc12ab7f6d85dd5074ca796059f61ec Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sat, 19 Aug 2017 15:38:16 +1000 Subject: [PATCH] Fix the test in main causing access violation --- src/Client/Program.c | 3 ++- src/Client/WinWindow.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Client/Program.c b/src/Client/Program.c index f071b2dd6..ff3bf9d2f 100644 --- a/src/Client/Program.c +++ b/src/Client/Program.c @@ -7,7 +7,8 @@ int main(int argc, char* argv[]) { ErrorHandler_Init(); Platform_Init(); - Window_Create(0, 0, 320, 320, "TEST", NULL); + String str = String_FromConstant("TEST"); + Window_Create(320, 320, 320, 320, &str, NULL); Window_SetVisible(true); while (true) { Window_ProcessEvents(); diff --git a/src/Client/WinWindow.c b/src/Client/WinWindow.c index 245c96532..5b3506ea2 100644 --- a/src/Client/WinWindow.c +++ b/src/Client/WinWindow.c @@ -442,7 +442,7 @@ void Window_Create(Int32 x, Int32 y, Int32 width, Int32 height, STRING_TRANSIENT } win_Handle = CreateWindowExA( - win_StyleEx, win_ClassName, title->buffer, win_Style, + win_StyleEx, atom, title->buffer, win_Style, rect.left, rect.top, RECT_WIDTH(rect), RECT_HEIGHT(rect), NULL, NULL, win_Instance, NULL);