From dd0dee3afcfbabf6b1efe36136b5506857e76aef Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 3 Jun 2014 01:01:39 +0300 Subject: [PATCH] unix: Properly print script filename in case of error. --- unix/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/main.c b/unix/main.c index c9f38d6139..992ea1fec5 100644 --- a/unix/main.c +++ b/unix/main.c @@ -355,7 +355,7 @@ int main(int argc, char **argv) { } else { char *basedir = realpath(argv[a], NULL); if (basedir == NULL) { - fprintf(stderr, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[1], errno); + fprintf(stderr, "%s: can't open file '%s': [Errno %d] ", argv[0], argv[a], errno); perror(""); // CPython exits with 2 in such case ret = 2;