[gtk+/gtk-2-24] GDK W32: Replace wcscpy_s with wcsncpy for XP compatibility
- From: Руслан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-2-24] GDK W32: Replace wcscpy_s with wcsncpy for XP compatibility
- Date: Wed, 18 Jan 2017 09:18:35 +0000 (UTC)
commit 79b2a92fe59e03cdd12cb8108a1e7b117c94f4c3
Author: Руслан Ижбулатов <lrn1986 gmail com>
Date: Sun Jan 15 14:03:50 2017 +0000
GDK W32: Replace wcscpy_s with wcsncpy for XP compatibility
https://bugzilla.gnome.org/show_bug.cgi?id=768722
gdk/win32/gdkkeys-win32.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkkeys-win32.c b/gdk/win32/gdkkeys-win32.c
index 12c6c07..36113e3 100644
--- a/gdk/win32/gdkkeys-win32.c
+++ b/gdk/win32/gdkkeys-win32.c
@@ -559,7 +559,7 @@ check_that_active_layout_is_in_sync (GdkWin32Keymap *keymap)
if (hkl != cached_hkl)
{
if (!GetKeyboardLayoutNameW (hkl_name))
- wcscpy_s (hkl_name, KL_NAMELENGTH, L"(NULL)");
+ wcsncpy (hkl_name, L"(NULL)", KL_NAMELENGTH);
g_warning ("Cached active layout #%d (0x%p) does not match actual layout %S, 0x%p",
keymap->active_layout, cached_hkl, hkl_name, hkl);
@@ -656,7 +656,7 @@ update_keymap (GdkKeymap *gdk_keymap)
wchar_t hkl_name[KL_NAMELENGTH];
if (!GetKeyboardLayoutNameW (hkl_name))
- wcscpy_s (hkl_name, KL_NAMELENGTH, L"(NULL)");
+ wcsncpy (hkl_name, L"(NULL)", KL_NAMELENGTH);
GDK_NOTE (EVENTS, g_print ("(active, %S)", hkl_name));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]