aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCohenArthur <arthur.cohen@epita.fr>2021-06-01 11:57:11 +0200
committerCohenArthur <arthur.cohen@epita.fr>2021-06-01 12:57:25 +0200
commit7fb247dce4ffa6a94b229fd2ce28dbc167bbc0ec (patch)
treec98349b22191cca64c0715d9337cf6afa57eb2ff
parent4b13e27087a4c68824c281b2f980a7561dc39407 (diff)
downloadgcc-7fb247dce4ffa6a94b229fd2ce28dbc167bbc0ec.zip
gcc-7fb247dce4ffa6a94b229fd2ce28dbc167bbc0ec.tar.gz
gcc-7fb247dce4ffa6a94b229fd2ce28dbc167bbc0ec.tar.bz2
raiifile: Allow dash-prefixed files to be parsed
-rw-r--r--gcc/rust/lex/rust-lex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/lex/rust-lex.h b/gcc/rust/lex/rust-lex.h
index 8a9640e..00f9d21 100644
--- a/gcc/rust/lex/rust-lex.h
+++ b/gcc/rust/lex/rust-lex.h
@@ -18,7 +18,7 @@ private:
public:
RAIIFile (const char *filename)
{
- if (strncmp (filename, "-", 1) == 0)
+ if (strcmp (filename, "-") == 0)
file = stdin;
else
file = fopen (filename, "r");