Skip to content

Commit

Permalink
Fix wrong String split regex when checking OS version
Browse files Browse the repository at this point in the history
The "." character should be escaped as "\\." otherwise we get an empty String array
  • Loading branch information
Phillipus authored and sratz committed Feb 13, 2024
1 parent fd826d3 commit 01e881a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ private static Image getImage(Display display, InputStream input) {
* (https://github.com/eclipse-platform/eclipse.platform.swt/issues/772) ,Splash
* Screen gets flipped.As a workaround the image is flipped and returned.
*/
if (Integer.parseInt(System.getProperty("os.version").split(".")[0]) >= 14) { //$NON-NLS-1$ //$NON-NLS-2$
if (Integer.parseInt(System.getProperty("os.version").split("\\.")[0]) >= 14) { //$NON-NLS-1$ //$NON-NLS-2$
GC gc = new GC(image);
Transform tr = new Transform(display);
tr.setElements(1, 0, 0, -1, 0, 0);
Expand Down

0 comments on commit 01e881a

Please sign in to comment.