diff options
-rw-r--r-- | platform/x11/win_main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c index 860c6dbc..67efdb9d 100644 --- a/platform/x11/win_main.c +++ b/platform/x11/win_main.c @@ -1280,7 +1280,7 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow if (fz_optind < argc) { - strcpy(filename, argv[fz_optind]); + strcpy(filename, argv[fz_optind++]); } else { @@ -1291,6 +1291,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShow winerror(&gapp, "cannot convert filename to utf-8"); } + if (fz_optind < argc) + gapp.pageno = atoi(argv[fz_optind++]); + if (bps) pdfapp_open_progressive(&gapp, filename, 0, bps); else |