changeset 55764:321bddd9afdf

8228468: awt_Robot.c : format string contains 0 within the string body Reviewed-by: serb
author mbaesken
date Mon, 22 Jul 2019 10:15:46 +0200
parents d999a1a11485
children aaa83519e723
files src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c	Tue Jul 23 00:29:31 2019 -0400
+++ b/src/java.desktop/unix/native/libawt_xawt/awt/awt_Robot.c	Mon Jul 22 10:15:46 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -150,7 +150,7 @@
 static jboolean isXCompositeDisplay(Display *display, int screenNumber) {
 
     char NET_WM_CM_Sn[25];
-    snprintf(NET_WM_CM_Sn, sizeof(NET_WM_CM_Sn), "_NET_WM_CM_S%d\0", screenNumber);
+    snprintf(NET_WM_CM_Sn, sizeof(NET_WM_CM_Sn), "_NET_WM_CM_S%d", screenNumber);
 
     Atom managerSelection = XInternAtom(display, NET_WM_CM_Sn, 0);
     Window owner = XGetSelectionOwner(display, managerSelection);