From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11792 invoked by alias); 9 Jan 2013 15:25:09 -0000 Received: (qmail 11610 invoked by uid 48); 9 Jan 2013 15:24:50 -0000 From: "schwab@linux-m68k.org" To: glibc-bugs@sourceware.org Subject: [Bug libc/14896] getopt_long: optind contains invalid index in very specific cases Date: Wed, 09 Jan 2013 15:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: schwab@linux-m68k.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00047.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=14896 Andreas Schwab changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |INVALID --- Comment #1 from Andreas Schwab 2013-01-09 15:24:48 UTC --- optind always points at the next argument to be parsed. If you want the last parsed one you need to use optind-1. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.