8228468: awt_Robot.c : format string contains 0 within the string body

Reviewed-by: serb
This commit is contained in:
Matthias Baesken 2019-07-22 10:15:46 +02:00
parent 3e9d9e5e2e
commit 2953d87fad

View File

@ -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 Bool hasXCompositeOverlayExtension(Display *display) {
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);