[commit: ghc] master: Fix off-by-one (#7227) (5f01b6d)

Simon Marlow <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/5f01b6dd095955e9a52f5624213a7c54dc5e1a8c

>---------------------------------------------------------------

commit 5f01b6dd095955e9a52f5624213a7c54dc5e1a8c
Author: Simon Marlow <[email protected]>
Date:   Tue Sep 11 16:12:52 2012 +0200

    Fix off-by-one (#7227)

>---------------------------------------------------------------

 rts/RtsFlags.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index 42c7ef7..4ee19cf 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -547,6 +547,7 @@ void setupRtsFlags (int *argc, char *argv[],
     procRtsOpts(rts_argc0, rtsOptsEnabled);
 
     appendRtsArg((char *)0);
+    rts_argc--; // appendRtsArg will have bumped it for the NULL (#7227)
 
     normaliseRtsOpts();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.