Skip to content

Commit 16e0b5b

Browse files
author
pepc84
committed
Fix regex escaping in gppMajorVersion
1 parent 3b3f929 commit 16e0b5b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/java/CppBuild.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3372,7 +3372,7 @@ static int gppMajorVersion(String gpp) {
33723372
String out = new String(proc.getInputStream().readAllBytes());
33733373
proc.waitFor();
33743374
// Output: "g++ (GCC) 13.2.0 ..." or "Apple clang version 15.0.0 ..."
3375-
java.util.regex.Matcher m = java.util.regex.Pattern.compile("(\d+)\.\d+\.\d+").matcher(out);
3375+
java.util.regex.Matcher m = java.util.regex.Pattern.compile("(\\d+)\\.\\d+\\.\\d+").matcher(out);
33763376
if (m.find()) return Integer.parseInt(m.group(1));
33773377
} catch (Exception ignored) {}
33783378
return 0;

0 commit comments

Comments
 (0)