diff options
author | David Tardon <dtardon@redhat.com> | 2014-07-30 18:36:48 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-08-01 10:21:31 +0200 |
commit | e644bb59ff57430193c8abb7470cd1c058d6154c (patch) | |
tree | 1dd861bcd0b5d74ba6380904417df6ab4131297c /sdext | |
parent | Convert DLG_DATABASE_WIZARD dialog to .ui (diff) | |
download | core-e644bb59ff57430193c8abb7470cd1c058d6154c.tar.gz core-e644bb59ff57430193c8abb7470cd1c058d6154c.zip |
fix parsing of cmdline args
Change-Id: I4005c08d4163d5d26f227e01c2520379f717343a
Diffstat (limited to 'sdext')
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx index 94171b03f1df..c6294cc9f4a4 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -37,23 +37,23 @@ int main(int argc, char **argv) if (!strcmp(argv[k], "-f")) { outputFile = argv[k+1]; - --argc; + argc -= 2; for (int j = k; j < argc; ++j) - argv[j] = argv[j+1]; + argv[j] = argv[j+2]; } else if (!strcmp(argv[k], "-opw")) { ownerPassword = argv[k+1]; - --argc; + argc -= 2; for (int j = k; j < argc; ++j) - argv[j] = argv[j+1]; + argv[j] = argv[j+2]; } else if (!strcmp(argv[k], "-upw")) { userPassword = argv[k+1]; - --argc; + argc -= 2; for (int j = k; j < argc; ++j) - argv[j] = argv[j+1]; + argv[j] = argv[j+2]; } ++k; } |