summaryrefslogtreecommitdiffstats
path: root/src/os_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 2bf0fe7122..e5cfac7294 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -156,7 +156,10 @@ static HANDLE g_hConOut = INVALID_HANDLE_VALUE;
// Win32 Screen buffer,coordinate,console I/O information
static SMALL_RECT g_srScrollRegion;
-static COORD g_coord; // 0-based, but external coords are 1-based
+// This is explicitly initialised to work around a LTCG issue on Windows ARM64
+// (at least of 19.39.33321). This pushes this into the `.data` rather than
+// `.bss` which corrects code generation in `write_chars` (#13453).
+static COORD g_coord = {0, 0}; // 0-based, but external coords are 1-based
// The attribute of the screen when the editor was started
static WORD g_attrDefault = 7; // lightgray text on black background