From 7fb247dce4ffa6a94b229fd2ce28dbc167bbc0ec Mon Sep 17 00:00:00 2001 From: CohenArthur Date: Tue, 1 Jun 2021 11:57:11 +0200 Subject: raiifile: Allow dash-prefixed files to be parsed --- gcc/rust/lex/rust-lex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc') 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"); -- cgit v1.1