From ef6947376630f67682485b50b629c5cb14cd926a Mon Sep 17 00:00:00 2001 From: ewt Date: Mon, 17 Feb 1997 20:28:50 +0000 Subject: [PATCH] be a bit more carefull about checking --rcfiles argument CVS patchset: 1436 CVS date: 1997/02/17 20:28:50 --- rpm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/rpm.c b/rpm.c index 1cade4c4d..cb91bc579 100755 --- a/rpm.c +++ b/rpm.c @@ -507,11 +507,11 @@ int main(int argc, char ** argv) { currarg = argv; while (*currarg) { if (!strcmp(*currarg, "--rcfile")) { - rcfile = *(currarg + 1); + rcfile = *(++currarg); } else if (!strcmp(*currarg, "--buildarch")) { - arch = *(currarg + 1); + arch = *(++currarg); } else if (!strcmp(*currarg, "--buildos")) { - os = *(currarg + 1); + os = *(++currarg); } else if (!strcmp(*currarg, "--showrc")) { showrc = 1; building = 1; @@ -521,7 +521,8 @@ int main(int argc, char ** argv) { !strcmp(*currarg, "--recompile")) { building = 1; } - currarg++; + + if (*currarg) currarg++; } /* reading this early makes it easy to override */