From 4ffaa215abefb838e62ff80aad48ec53f412c766 Mon Sep 17 00:00:00 2001 From: stanley lieber Date: Thu, 1 Mar 2012 08:32:05 -0600 Subject: paint: cause 's' to prompt with the file name if paint is invoked with a file name as its argument --- sys/src/cmd/paint.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/src/cmd/paint.c b/sys/src/cmd/paint.c index f10000955..fa058d1e3 100644 --- a/sys/src/cmd/paint.c +++ b/sys/src/cmd/paint.c @@ -73,7 +73,8 @@ main(int argc, char *argv[]) case 0: break; case 1: - if(loadimg(argv[0]) < 0) + strncpy(file, argv[0], sizeof(argv[0])); + if(loadimg(file) < 0) sysfatal("%r"); break; } -- cgit v1.2.3